I am attaching a file that shows how the sample data is stored in a table and what the expected results are from that table.
Basically, I need to be able to write a query that shows last 6 weeks trend for certain Action's. I need the First day of the week to be Sunday. For a certain Table name, if there are more data inserted within one week then it should get the max RUN_DT for that week and its related counts.
Could someone please help?