I have a table of order information called Demands with data that would look something like this:
Invoice | Product | Quantity | Route
————————|—————————|——————————|——————————
2254619 | A | 10 | 20160112
2254619 | B | 5 | 20160112
2254619 | C | 4 | 20160112
2254619 | D | 7 | 20160112
2254619 | E | 3 | 20160112
2254808 | A | 8 | 20160112
2254808 | B | 2 | 20160112
2254808 | C | 9 | 20160112
2254808 | D | 0 | 20160112
2254808 | E | 11 | 20160112
2254902 | A | 7 | 20160113
2254905 | A | 4 | 20160113
What I need is a query that will calculate the total Quantity for ALL Products for every Route.
So, the results would show that Route 20160112 has a Quantity of 18 of Product A, 7 of Product B, etc. and that Route 20160113 has 11 Product A, etc.
And this will be for multiple routes and many different products.
Any help you guys can provide would be immensely appreciated.