Re: Query Confusion -- Please help
From: Vishal Parkar (REMOVE_THIS_vgparkar_at_yahoo.co.in)
Date: 03/25/04
- Previous message: Steve Kass: "Re: QRY question: If field1 is null then field2"
- In reply to: JasonCook: "Query Confusion -- Please help"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 26 Mar 2004 01:29:38 +0530
hi jason,
Try following query:
select
SumOfcat1, SumOfcat3, SumOfcat2, monthID , (sumofcat1+sumofcat2+sumofcat3)
AS MonthlyTotal ,
(select sum(cat1)+sum(cat2)+sum(cat3)
from transactions a
where a.monthid <= x.monthid ) 'grandtotal'
from
(SELECT Sum(Transactions.cat1) AS SumOfcat1, Sum(Transactions.cat3) AS
SumOfcat3,
Sum(Transactions.cat2) AS SumOfcat2, monthID
FROM Transactions
GROUP BY monthID)X
ORDER BY monthID;
-- Vishal Parkar vgparkar@yahoo.co.in
- Previous message: Steve Kass: "Re: QRY question: If field1 is null then field2"
- In reply to: JasonCook: "Query Confusion -- Please help"
- Messages sorted by: [ date ] [ thread ]