SQL |
SELECT DISTINCT subtyp2, count(distinct style_id) as itemCount
FROM web_all_products
WHERE dept='CAMP AND HIKE' and typ='HYDRATION' and subtyp1='Hydration Packs' and upper(subtyp2)<>'EMPTY' and style_id IN (975,981,1014,1019,1032,1038,1046,5082,5094,5158,5167,8205,14235,14238,14555,14564,14565,15011,15015,15016,15876,16164,16166,16289,16585,16587,16590,16591,16592,16593,17048,17049,17050,17250,17476,17503,18339,19002,19455)
GROUP BY subtyp2 |