Viewing post 1 (of 1 total)
This one gives you even more flexibility to filter on/output counts of each product:
SELECT CustomerID, cnt_A, cnt_B, cnt_C
FROM (
SELECT
CustomerID
, SUM(CASE ProductCode WHEN 'A' THEN 1 ELSE 0 END)...
March 30, 2012 at 4:33 am
#1466848