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,1019,1038,1046,5082,8205,14238,14564,14565,15011,15015,15876,16164,16166,16591,16592,17049,17250,17476,17503,17587,18339,19002,19455,21705,21715,21718,21719)
GROUP BY subtyp2 |