SQL |
SELECT DISTINCT subtyp2, count(distinct style_id) as itemCount
FROM web_all_products
WHERE dept='CAMP AND HIKE' and typ='BACKPACKS AND BAGS' and subtyp1='Daypacks' and upper(subtyp2)<>'EMPTY' and style_id IN (5046,5060,5065,5068,5072,5077,5078,5088,5145,5166,5196,5197,14246,14266,14267,14272,18787,18788,18790,19458,19463,19685,20107,20953,20954,20955)
GROUP BY subtyp2 |