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,105,107,119,121,451,454,3785,3798,3877,3924,4089,4185,4188,8421,9215,11337,15690,17109,17110,17111,17115,17116,17117,17118,17320,17688,20071)
GROUP BY subtyp2 |