SQL |
SELECT DISTINCT subtyp1, count(distinct style_id) as itemCount
FROM web_all_products
WHERE dept='CLOTHING AND FOOTWEAR' and typ='WOMENS' and upper(subtyp1)<>'EMPTY' and style_id IN (918,930,953,1425,1427,1751,1752,1753,1829,1835,1934,1945,1952,1956,1992,2206,2224,2362,3077,3201,3258,3302,3529,4846,4847,4964,5221,5236,5249,5279,5301,5302,5307,5313,5316,5339,5479,5535,5563,5564,5662,5696,5871,6046,6047,6048,6050,6062,6067,6139,6240,6293,6316,8241,8242,8246,8262,8266,8278,8283,8800,9130,9265,9400,9593,9858,9899,10353,10433,10434,10435,10760,10841,10853,10979,10983,10985,11269,11288,11311,11313,11578,11589,11593,13909,13910,14255,14678,14829,15433,15555,15637,15657,15729,15741,15830,16013,16015,16019,16022,16058,16093,16094,16097,16098,16126,16216,16219,16221,16224,16366,16659,16660,16750,16752,16789,16794,16836,16870,16872,16959,17194,17485,17487,17620,17621,17623,17811,18027,18029,18127,18150,18175,18228,18234,18236,18237,18250,18263,18298,18376,18379,18380,18382,18384,18386,18388,18393,18395,18535,18541,18669,18672,18673,18709,18793,18985,19071,19161,19253,19254,19297,19352,19353,19363,19379,19381,19497,19555,19732,19876,20051,20267,20293,20297,20368,20396,20465,20524,20538,20569,20635,20636,20843,20857,20934,21089,21112,21114,21123,21124,21236,21262,21269,21271,21276,21281,21282,21284,21288,21354,21357,21359,21361,21366,21367,21368,21592,21594,21741,21823,21827,19629)
GROUP BY subtyp1 |