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,1761,5046,5060,5065,5072,5073,5077,5078,5145,5163,5165,5166,9511,9691,13986,14246,14250,14272,14273,14400,14401,14574,14575,14763,14815,16589,16646,16999,17000,17106,17107,17768,17843,18739,18798)
GROUP BY subtyp2 |