Files
MBS/PROYECTO/gedir/suma1.sql.txt
T

9 lines
405 B
Plaintext

SELECT a.tipo_cliente,a.sec_cliente,b.nombre,b.limite_credito,SUM(a.neto)
FROM vetb00002 a,vetb00004 b
WHERE a.status_t IS NULL AND a.fecha_factura between "01101999" AND "23022000" AND
a.tipo_cliente = b.tipo_cliente and
a.sec_cliente = b.sec_cliente AND b.status_t IS NULL
and a.ventas = '1'
GROUP BY 1,2,3,4 ORDER BY 5 DESC,1,2