Subtract the month and include each subsequent day from the range of up to 4 days when the addition of the month does not exceed the current date.
DECLARE @Today DATE = '2/28/2013';
SELECT [Current] = @Today, [MonthAgo] = DATEADD(DAY,t.v,DATEADD(MONTH,-1,@Today))
FROM (VALUES(0),(1),(2),(3)) as t(v)
WHERE DATEADD(MONTH,1,DATEADD(DAY,t.v,DATEADD(MONTH,-1,@Today))) <= @Today;
Result for 02/28/2013:
Current MonthAgo
2013-02-28 2013-01-28
2013-02-28 2013-01-29
2013-02-28 2013-01-30
2013-02-28 2013-01-31
Result for 3/27/2013:
Current MonthAgo
2013-03-27 2013-02-27
Result for 04/30/2013:
Current MonthAgo
2013-04-30 2013-03-30
2013-04-30 2013-03-31
... etc..
Edit:
My answer above can be applied by transferring it to the CTE and then directly attaching it to the original request. Note that calls to built-in functions are always limited to four lines for the entire query, so the performance impact of date functions should be negligible:
DECLARE @Today DATE = GETDATE();
; WITH CTE AS (
SELECT [Current] = @Today, [MonthAgo] = DATEADD(DAY,t.v,DATEADD(MONTH,-1,@Today))
FROM (VALUES(0),(1),(2),(3)) as t(v)
WHERE DATEADD(MONTH,1,DATEADD(DAY,t.v,DATEADD(MONTH,-1,@Today))) <= @Today
)
SELECT [User Id],[Sign Up Date]
FROM [Monthly Account Update]
JOIN CTE ON CTE.[MonthAgo] = [Sign Up Date];
GO