Click to See Complete Forum and Search --> : SQL Group By


millseyno1
12-16-2009, 01:37 AM
I have a query that collects data from a table and groups by the date on file (dofMonth)

SELECT DOFMonth, COUNT(*), SUM(Value) FROM table1 GROUP BY DOFMonth

Unfortunatly if there are no entries for a particual month the month is not shown at all. Is there a way I can show months even if they have no date on files with just 0 values.

Thanks,

ssystems
12-16-2009, 10:54 PM
What database are you using? IS NULL (http://dev.mysql.com/doc/refman/5.0/en/comparison-operators.html#function_isnull)