0

I have a request for a report that must return the total qty of items shipped, grouped by item, within a date range. No big deal. BUT they want the report to display one column for each month in the range.

Example: Customer specified start date = 2017-11-15 and end date = 2018-03-14

There is a bunch of columns prior to the month columns, but for the sake of simplicity, I'll use only ITEMCODE in the example. The result should look like the following:

ITEMCODE | NOV 17 | DEC 17 | JAN 18 | FEB 18 | MAR 18
SHIRT123 |   10   |    25  |   33   |   20   |   7
PANTS123 |   5    |    20  |   20   |   18   |   6

I don't even know if it's possible to do this. Note, under each month is the sum of the QTY column.

Lberteh
  • 165
  • 13
  • Possible duplicate of [Creating SQL table with range of months as columns and populating fields with table data](https://stackoverflow.com/questions/22074443/creating-sql-table-with-range-of-months-as-columns-and-populating-fields-with-ta) – Matt Salzman Mar 14 '18 at 14:01
  • Thank you, reading the thread now and trying to figure this out. I'll post here if I come up with a solution – Lberteh Mar 14 '18 at 14:09

0 Answers0