Insert missing dates within table
Using your base sample query above, this code should do what you are looking for. The important changes:


CROSS JOIN to a list of IDs that should be in the report
JOIN to the data table using Date and ID
SELECT the id from the CROSS JOIN table


The code:

DECLARE @s DATE = '20140518', @e DATE = '20140520';

SELECT 
    i.ID, 
    c.[date], 
    Frequency = COALESCE(a.Frequency,0)
FROM 
    dbo.Calendar AS c
CROSS JOIN (SELECT DISTINCT x.ID FROM dbo.table x WHERE x.date &gt;= @s AND x.date &lt; DATEADD(day, 1, @e)) AS i
LEFT OUTER JOIN 
    dbo.table AS a
ON 
    c.[date] = a.[date]
    AND a.ID = i.ID
WHERE 
    c.[date]&gt;= @s
    AND c.[date] &lt; DATEADD(DAY, 1, @e);