I have a table of transactions with a date column. I am trying to make a report of the number for each month. There aren't transactions for every month so I need to be able to show 0 for those months.

Normally I'd do a select count(*), date from FOO group by date to get the data. However this leaves out the months with no data.

One suggestion I got was to create a dummy table w/several hundred rows, then create a view that does a add_months against the ROWNUM pseudocolumn, then do a outer join to that view. That works but it feels like the wrong way to me. Is there a better way (outside of a cursor) to do this?