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 (1759,2332,5046,5060,5065,5068,5072,5077,5078,5143,5196,5197,8378,9511,9527,9543,9690,9691,9946,13986,14246,14267,14272,14401,14575,14815,15222,15223,16910,16999,17000,17107,17843,18739,18787,18788,19341,19343,19344,19346,19458,19683,19685,19691,19734,19735,19963,20954,20955,21009,21010,21011,21705,21718,21719,22240,22434,5206)
GROUP BY subtyp2 |