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,1759,2332,4009,4480,5046,5063,5065,5068,5070,5072,5077,5078,5088,5092,5106,5107,5129,5143,5145,5165,5166,5194,5196,5197,5204,8378,8379,8380,8381,8390,8427,8428,8431,8432,8433,8437,9511,9527,9543,9946,9993,13885,13986,14238,14239,14246,14247,14250,14266,14271,14272,14401,14566,14574,14575,14815,14943,15618,15620,15621,16382,16646,16910,17000,17107,17642,17766,18080,18408,18739,18783,18787,18788,18790,18794,18906,18907,18908,18909,18910,18911,19002,19224,19306,19341,19343,19344,19438,19440,19446,19447,19451,19455,19463,19685,19691,19734,19963,20096,20097,20098,20107,20108,20138,20621)
GROUP BY subtyp1 |