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 (1759,2332,3755,4009,4480,5046,5060,5063,5065,5068,5070,5072,5077,5078,5105,5106,5107,5115,5129,5143,5194,5196,5197,8378,8379,8380,8381,8390,8397,8431,8433,8437,9511,9527,9543,9690,9691,9946,13986,14238,14239,14246,14247,14267,14271,14272,14401,14566,14575,14815,14967,15222,15223,15618,15619,15621,15622,16382,16910,16999,17000,17107,17766,17843,18408,18739,18781,18782,18787,18788,18906,18907,18908,18909,18910,18911,19002,19224,19341,19343,19344,19346,19438,19440,19446,19447,19448,19451,19455,19458,19683,19685,19691,19734,19735,19963,20096,20098,20108,20917,20918,20919,20950,20954,20955,21009,21010,21011,21568,21705,21715,21718,21719,21745,22240,22434,5049,5206)
GROUP BY subtyp1 |