I have a query that is dependent on 3 variables, this is look at the sales thats happening in the last 35 days.
the query is
week_number = Previous week number
and agent_sale_Date between variable1 (last saturday) and variable2(last saturday - 35)
I need to do the same going back 10 weeks!!
I would need to generate the week numbers from last week going back 10 weeks. I need to run this on a Monday, so the other 2 variables I can hard code or use an inline table I think. How do we generate the week numbers, and also is there a way to do variable 2 and 3 on the fly? many thanks for your help