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,5082,5094,5158,5167,5199,5202,8205,14235,14238,14555,14564,14565,15011,15014,15015,15017,15593,15876,16164,16166,16289,16379,16585,16587,16590,16591,16592,16593,17047,17050,17250,17476,17587,18339,18779)
GROUP BY subtyp2 |