Hi
In below query i want to group by code,name. But when i group then it gives error DueDate is not grouped by.
SELECT T1."CardCode", T1."CardName", CASE when (DAYS_BETWEEN(T0."DueDate", now()))+1 < 31 then case when T0."SYSCred" <> 0 then -T0."SYSCred" else T0."SYSDeb" end end "0-30 days", FROM JDT1 T0 inner join OCRD T1 on T1."CardCode" = T0."ShortName" INNER JOIN OJDT T2 ON T2."TransId"=T0."TransId" WHERE T1."U_MSME" = 'Y' AND "T1"."CardType" = 'S' ORDER BY T1."CardCode", T0."TaxDate"
Thanks