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,1516,1759,1763,3755,4009,4473,4474,4480,4486,5046,5063,5065,5070,5072,5073,5077,5078,5088,5092,5093,5106,5107,5115,5122,5129,5151,5165,5166,5196,5197,8379,8380,8381,8390,8391,8397,8427,8428,8429,8431,8432,8433,8437,9511,9691,9993,13885,13986,14238,14239,14246,14247,14250,14270,14271,14272,14273,14400,14401,14566,14574,14575,14763,14815,14943,14967,15618,15619,15620,15621,15622,15625,16381,16382,16589,16646,16647,16999,17000,17106,17107,17147,17642,17643,17843,18080,18408,18719,18781,18783,18785,18786,18787,18788,18789,18790,18798,18905,18906,18907,18908,18909,18910,18911,18912,19002,19003,19224,19305,19306,19341,19343,19344,19346,19438,19440,19446,19447,19448,19451,19455,19463)
GROUP BY subtyp1 |