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,1018,1019,1032,1038,1046,5054,5082,5094,5157,5158,5199,5202,8205,14235,14238,14565,15011,15014,15015,15016,15017,15593,15876,16164,16165,16166,16289,16585,16587,16588,16590,16591,16593,17047,17048,17049,17050,17250,17476,17503,17587)
GROUP BY subtyp2 |