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 (1489,1759,2332,3755,4009,4010,4480,5046,5060,5063,5065,5068,5070,5071,5072,5077,5078,5088,5092,5106,5107,5115,5129,5145,5166,5168,5194,5196,5197,8378,8379,8380,8381,8390,8427,8431,8432,8433,8437,9511,9527,9543,9946,13885,13986,14238,14239,14246,14247,14266,14267,14270,14271,14272,14401,14566,14574,14575,14815,14943,14967,15222,15223,15618,15619,15620,15621,15622,16382,16646,17000,17107,17642,17766,17843,18080,18408,18782,18783,18787,18788,18790,18794,18906,18907,18908,18909,18910,18911,19002,19224,19306,19341,19343,19344,19346,19438,19440,19446,19447,19451,19455,19458,19463,19685,19691,19734,19963,20096,20107,20915,20916,20917,20918,20919,20933,20934,20938,20950,20951,20953,20954,20955,21568,21597,21705,21715,21718,21719)
GROUP BY subtyp1 |