Usually you achieve this type of thing by adding a value table , i.e. a table containing all the values you are interested in.
Typical value tables may contain, for example, integer values from 0 to 1000 or all dates for a given period. Often, Value tables contain more values than required, and we get the exact result desired by adding filters to the WHERE clause.
, . , ValTableDates 2005 2010 , :
SELECT AVG(data) AS data, VT.ValDate
FROM ValTableDates VT
LEFT JOIN table T ON T.dateReg = VT.ValDate
WHERE VT.ValDate > [Some Start Date] and VT < [Some End Date]
GROUP BY YEAR(dateReg), MONTH(dateReg), DAY(dateReg)
ORDER BY dateReg
, Zero, NULL, , .
/, [date], , , , .