I am tyring to write a query that will give me the customer counts on a rolling 52 week ending on monthly basis. I can't seem to find anything anywhere that will help me. I am trying to avoid pulling the query 12 times to get the 52 week customer counts ending for each month!
this is what I have so far:
Select brand_dsc, count(distinct xtra_card_nbr) ,case when num_txn=1 then 'Trial' else 'Repeat' end as Tot_txn