dkilby
asked on
ms sql last 8 weeks as columns
I need a query that shows how much each customer has ordered for the last 8 weeks, and the week dates are the columns.
Something Like
Customer ID 11/27/2016 12/4/2016 12/11/2016 12/18/2016..........
124355 $48.50 $156.00 $25.00 $32.00
The total for the week is a sum of all orders for that week.
what is the easiest way to do this ?
Thanks
Something Like
Customer ID 11/27/2016 12/4/2016 12/11/2016 12/18/2016..........
124355 $48.50 $156.00 $25.00 $32.00
The total for the week is a sum of all orders for that week.
what is the easiest way to do this ?
Thanks
Can you please provide few rows ?
ASKER
Customer ID
DateOfOrder
AmountOfOrder
are the columns names I am working with.
DateOfOrder
AmountOfOrder
are the columns names I am working with.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Open in new window