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,4486,5046,5065,5072,5073,5077,5078,5088,5093,5165,5166,5196,5197,9511,9691,13986,14246,14250,14272,14273,14400,14401,14574,14575,14763,14815,16589,16646,16999,17000,17106,17107,17843,18719,18785,18786,18787,18788,18789,18790,18798,19003,19341,19343,19344,19346,19463)
GROUP BY subtyp2 |