I need help please,
I have multiple dates in my data.
My first query is selecting the MAX date for each person/account, the next query should jump one month back and the next 3 month back and so on.
How I can define the number of months to jump?
For example, this is my first query:

proc sql;
select count(ACCT_ID) as Total_count, SEG, TM_ID, PRD_CD
from CUST_DATA
where OBSVTN_DT=(select max(OBSVTN_DT) from CUST_DATA)
group by TM_ID, SEG, PRD_CD
order by PRD_CD, SEG;
quit;