SQL |
SELECT DISTINCT subtyp2, count(distinct style_id) as itemCount
FROM web_all_products
WHERE dept='CAMP AND HIKE' and typ='HEALTH AND SAFETY' and subtyp1='Sun & Bug Protection' and upper(subtyp2)<>'EMPTY' and style_id IN (75,76,92,93,95,99,100,103,105,107,108,111,119,121,443,3772,3785,3798,3816,3877,4089,4185,4188,8421,8422,9215,11337,15690,15926,15927,17109,17110,17111,17113,17114,17115,17116,17117,17118,17320,17564,17688,18716,18904,19618)
GROUP BY subtyp2 |