SQL |
SELECT DISTINCT subtyp1, count(distinct style_id) as itemCount
FROM web_all_products
WHERE dept='CAMP AND HIKE' and typ='BACKPACKS AND BAGS' and upper(subtyp1)<>'EMPTY' and style_id IN (1014,1489,1516,1759,1761,1763,3755,4009,4010,4480,5046,5060,5063,5065,5070,5072,5073,5077,5078,5092,5115,5122,5145,5151,5163,5165,5166,5168,5194,8379,8380,8381,8389,8390,8391,8394,8397,8427,8428,8429,8431,8432,8433,9511,9691,9993,13885,13986,14238,14239,14246,14250,14271,14272,14273,14400,14401,14566,14574,14575,14763,14815,14943,14967,15117,15619,15620,15622,15625,16382,16589,16645,16646,16999,17000,17106,17107,17108,17147,17642,17643,17766,17768,17843,18080,18408,18739,18798,11459)
GROUP BY subtyp1 |