Suppose
DATEADD(month,DATEDIFF(mm,0,DATEADD(mm,-36,GETDATE()))
This gives me 36 month data in my UDF but need to get below requirement in my fact table
Can you help me with a query which gives previous month data and at the same time delete current month data