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,5072,5077,5078,5143,5196,5197,5206,9511,9527,9543,9690,9691,9946,14246,14267,14401,14815,15222,15223,16999,17000,17107,18739,18787,18788,19341,19343,19346,19458,19685,19734,19735,19963,20954,20955,21009,21010,21011,21159,21422,21705,21718,21719,22240,22434)
GROUP BY subtyp2 |