Wednesday, March 25, 2009

Unity : Günlük Ciroları gösteren SQL sorgusu

Günlük Ciroları gösteren SQL sorgusu



SELECT SUM(LG_444_01_INVOICE.NETTOTAL) AS [TOPLAM Ciro], LG_444_01_INVOICE.DATE_
FROM LG_444_01_INVOICE INNER JOIN
LG_444_CLCARD ON LG_444_01_INVOICE.CLIENTREF = LG_444_CLCARD.LOGICALREF
WHERE (LG_444_01_INVOICE.CANCELLED = 0)
GROUP BY LG_444_01_INVOICE.TRCODE, LG_444_01_INVOICE.DATE_
HAVING (LG_444_01_INVOICE.TRCODE = 1 AND LG_444_01_INVOICE.DATE_ >='20090101'
AND LG_444_01_INVOICE.DATE_ <='20090131') ORDER BY LG_444_01_INVOICE.DATE_



Sonuç:

No comments: