use a calendar table and left join your table to thatsomething likeSELECT c.[date],COALESCE(Cnt,0) AS CntFROM dbo.CalendarTable(@start,@end,0,0)cLEFT JOIN (SELECT DATEADD(dd,DATEDIFF(dd,0,lastmodifydate),0) AS [date],COUNT(yourfield) AS Cnt FROM YourTable GROUP BY DATEADD(dd,DATEDIFF(dd,0,lastmodifydate),0) )tON t.[date]=c.[date]
CalendarTable function can be found in below linkhttp://visakhm.blogspot.com/2010/02/generating-calendar-table.html------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/