Hi
I have a table “Customers” having these columns “ID”, “Name”, “Salary”, “Date”.
I want to make a query using which I can get the report for last 13 weeks.
Note: Week should be from Monday to Sunday and in output we need to show date on Sunday in Week column for every week
Output should be
=============================
Name Week Salary
A1 Sunday, 30 Jan,2011 10000
A2 Sunday, 06 Feb,2011 20000
A3 Sunday, 13 Feb,2011 30000
A4 Sunday, 20 Feb,2011 20000
A5 Sunday, 27 Feb,2011 50000
=============================
And so on…
I have a table “Customers” having these columns “ID”, “Name”, “Salary”, “Date”.
I want to make a query using which I can get the report for last 13 weeks.
Note: Week should be from Monday to Sunday and in output we need to show date on Sunday in Week column for every week
Output should be
=============================
Name Week Salary
A1 Sunday, 30 Jan,2011 10000
A2 Sunday, 06 Feb,2011 20000
A3 Sunday, 13 Feb,2011 30000
A4 Sunday, 20 Feb,2011 20000
A5 Sunday, 27 Feb,2011 50000
=============================
And so on…