Dear Experts
I have a dbf called "Avalbook" have following fields
date && type d
weight && type n
mode && type c
bags && type n
I want to get monthwise total of field weight
to do this I use following codes
SELECT MONTH(date) as nmonth,;
CMONTH(date) as cmonth,;
YEAR(date) as nyear,;
sum(weight) as weight;
from avlbook;
GROUP BY nmonth,nyear ;
ORDER BY nyear,nmonth;
INTO CURSOR Temp
This work fine for me, but now I want to get the total of bags feild with following condition
count bags for mode="L" as bagsLc
count bags for mode="B" as bagsBc
sum(bags)for mode="L" as bagsLs
sum bags for mode="B" as bagsBs
Please modify above four lines to add in my query
Thanks in advace