Looking to the output required, I feel a GROUP BY on COUNTRY,MONTH will worK with ROLLUP.
----------------------
Select country,month from data
where customertype='CONSUMER'
group by country,month with ROLLUP
order by country,month
----------------------
With Rollup can be eliminated if u don't want the Group summery extra rows.
B. Anant
|