i have membership table and a calendar table which i have joint to give result to this:
DECLARE @end DATE SET @start= (SELECT MIN(ACTIVITY_DATE) FROM REVENUE_AN