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,99,103,105,111,119,121,455,3785,3798,3877,3924,4089,4185,4188,9215,11337,15690,17109,17110,17111,17113,17115,17116,17117,17118,17688,18904,19618,21756,21812,21813)
GROUP BY subtyp2 |