Max, wont that return for the first 4 columns the sum for the max doc_Date only?
try this:
SELECT
SUM(P.LEDGER_GROSS),
SUM(P.LEDGER_NET),
SUM(P.Ledger_Gross - P.Ledger_Net),
MAX(P.Doc_Date) MAX_D,
IV.(_GROSS or _NET)
FROM Payment P,
(SELECT _GROSS (or _NET)
FROM...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.