Forgive me if this has been asked as I didn't even know what to search on.
I have two tables, SKU, and OrderSKU, that look like this:
SKU_Code Description
-----------------------------
1001 Product1
1002 Product2
1003 Product3
1004 Product5
OrderID SKU Quantity
-----------------------------
13 1001 34
13 1002 15
13 1004 2
15 1003 7
15 1004 8
I'd like a query that selects all the rows in the SKU table and then gives me a count for each sku in the OrderSku table (even if zero), grouped by Order ID. Ideally, the resultset would look like this:
OrderID 1001 1002 1003 1004
-------------------------------------
13 34 15 0 2
15 0 0 7 8
Is this possible?
Thanks, jeff