How can I come up with a stored procedure that selects results for past 30 days?
where MONTH(RequestDate) > 6 and DAY(RequestDate) >= 10 and MONTH(Req
Are you looking for last 30 days or last month? To find start and end of each month ("generic" as your comment says), use:
select dateadd(month,datediff(month,0,getdate()),0), dateadd(mm,datediff(mm,-1,getdate()),-1)