This is the code I used to go from individual to aggregate by year/month: proc sql; create table sqfagg as select put(sqfmthyr, YYMMN6.) as reporting_period, tract2010, count (*) as stopcount, sum(frisk) as friskcount format=comma10. , sum(furtive) as furtcount format=comma10. , sum(search) as searchcount format=comma10. , count(*) as stopcount format=comma10., sum(arrestmade) as arrestcount format=comma10., sum(summonissue) as summonscount format=comma10., sum(physicalforce) as phyfrc format=comma10., sum(criminaldress) format=comma10. as crimdress, sum(black) format=comma10. as blackcount, sum(white) format=comma10. as whitecount, sum(hispanic) format=comma10. as hispaniccount, sum(otherrace) format=comma10. as othracecount from sqfmonthyear group by tract2010, put(sqfmthyr, YYMMN6.) ; quit; This works, but now I need to aggregate to 6 month intervals but a rolling 6 months so 1/2006-6/2006, 2/2006-7/2006, 3/2006-8/2006 etc. @PaigeMiller I have reviewed your recommendations of how to post my question; however, I do not have code that is not working, I am trying to figure out where to start. And I simply trying to get some insight of different methods to try because I am stuck. Your instructions are not helping me.
... View more