SQL Statement for Grouping orders from 50 States
Posted on 2009-04-27
I need to be able to grid out sales from 50 states by month.
The database I have is SQL and the table is called: Orders
In the Table there are the following fields:
OrderID, OrderTotal, OrderState, OrderCompletedDate (the rest, I imagine is irrelevant)
I need to create a grid of 50 states (Vertical) and 12 months (current year- Horizontal) and insert figuers of order totals for each.
I haven't the foggiest idea of how to get this done and I am under a lot of presure to magically come up with a solution. Is there a genie on this website?