Hi,
Please refer to my thread thread184-1723072.
Two codes were suggested:
dt1 = {01/01/2017}
dt2 = {31/12/2017}
Sele Year(cdate) As theyear, ;
month(cdate) As themonth, ;
sum(debit) As debit, ;
sum(credit) As credit, ;
SUM(debit-credit) as net ;
from actran where BETWEEN(cdate,dt1,dt2) and...