SQL |
SELECT DISTINCT subtyp2, count(distinct style_id) as itemCount
FROM web_all_products
WHERE dept='CAMP AND HIKE' and typ='HYDRATION' and subtyp1='Accessories' and upper(subtyp2)<>'EMPTY' and style_id IN (963,980,990,991,1011,1022,1026,1031,1044,1045,3775,3830,3855,3937,5052,5053,5130,5134,5153,14166,14897,15081,15301,16297,16761,17051,17321,17347,17504,17558,17721,18061,18778)
GROUP BY subtyp2 |