SQL HELP
| From: | Andre | Date: | Mon, 27 Sep 2004 14:21:21 +0000 |
| Subject: | SQL HELP | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-197956@lists.php.net to get a copy of this message | ||
Hello I need some help on this SQL.
SELECT t1.factura_id
FROM factura t1, factura_conteudo t2, recibo_conteudo t4
WHERE t1.cliente_id = 1 AND t1.factura_id = t2.factura_id AND (
t4.documento_id <> t1.factura_id AND t4.valor_liquidado = "total" )
GROUP BY t1.factura_numero LIMIT 0, 30;
This SQL do this result :
factura_id
1
2
49
50
51
52
53
54
55
56
And the result I need is this
factura_id
2
50
51
52
53
54
55
56
How can I do the SQL