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 (1489,1759,2332,5046,5065,5068,5072,5077,5078,5088,5143,5145,5165,5166,5196,5197,5204,8378,9511,9527,9543,9946,13986,14246,14250,14266,14272,14401,14574,14575,14815,16646,16910,17000,17107,18739,18787,18788,18790,19341,19343,19344,19463,19685,19691,19734,19963,20107,20621)
GROUP BY subtyp2 |