Re: [PERFORM] column totals

2006-05-26 Thread Ragnar
On fös, 2006-05-26 at 11:56 +0200, James Neethling wrote: > SELECT branch_id, prod_cat_id, sum(prod_profit) as prod_cat_profit > FROM () as b1 > WHERE x = y > GROUP BY branch, prod_cat_id > > > Now, I also need the branch total, effectively, > SELECT branch_id, sum(prod_profit) as branch_tot

Re: [PERFORM] column totals

2006-05-26 Thread James Neethling
James Neethling wrote: Hi There, I've got a situation where I need to pull profit information by product category, as well as the totals for each branch. Basically, something like SELECT branch_id, prod_cat_id, sum(prod_profit) as prod_cat_profit FROM () as b1 WHERE x = y GROUP BY branc

[PERFORM] column totals

2006-05-26 Thread James Neethling
Hi There, I've got a situation where I need to pull profit information by product category, as well as the totals for each branch. Basically, something like SELECT branch_id, prod_cat_id, sum(prod_profit) as prod_cat_profit FROM () as b1 WHERE x = y GROUP BY branch, prod_cat_id Now, I al