SQL |
SELECT DISTINCT subtyp1, count(distinct style_id) as itemCount
FROM web_all_products
WHERE dept='CLOTHING AND FOOTWEAR' and typ='MENS' and upper(subtyp1)<>'EMPTY' and style_id IN (12,421,435,918,930,953,1753,1832,1859,1909,1936,1946,1947,1976,1997,2196,2221,2223,2232,2235,2362,3088,3098,3258,3529,4846,4847,4964,5221,5236,5249,5269,5279,5299,5300,5301,5302,5309,5313,5316,5324,5339,5405,5449,5451,5479,5550,5552,5553,5662,5696,5697,5718,5868,6062,8251,8560,8802,8814,8820,9063,9069,9130,9265,9399,9400,9518,9575,9626,9837,10433,10434,10435,10760,10788,10841,10856,11291,11321,11578,11589,11592,13911,14099,14101,14140,14255,14256,14382,14677,14678,14818,14836,14839,15635,15638,15643,15746,16013,16015,16019,16022,16121,16122,16125,16169,16170,16215,16216,16219,16221,16353,16354,16671,16685,16959,17174,17194,17399,17486,17488,17490,17811,17926,17927,17935,18002,18047,18155,18192,18228,18234,18236,18239,18250,18282,18283,18336,18346,18378,18380,18381,18535,18540,18669,18672,18673,18709,18740,18741,18803,18954,19071,19207,19253,19254,19267,19277,19279,19280,19349,19353,19354,19355,19497,19515,19516,19517,19518,19589,19731,19882,19931,20052,20078,20261,20262,20267,20268,20292,20293,20296,20298,20299,20326,20327,20328,20329,20330,20403,20465,20635,20636,20760,20843,20857,20902,20934,21082,21270,21274,21275,21287,21289,21290,21291,21367,21376,21377,21378,21380,21381,21383,21385,21387,21388,21569,21580,21587,21589,21593,21647,21741,952,8912,9355,19629)
GROUP BY subtyp1 |