SQL |
SELECT DISTINCT subtyp2, count(distinct style_id) as itemCount
FROM web_all_products
WHERE dept='CLOTHING AND FOOTWEAR' and typ='MENS' and subtyp1='Accessories' and upper(subtyp2)<>'EMPTY' and style_id IN (918,930,953,3098,5221,5236,5249,5269,5279,5299,5300,5301,5302,5309,5313,5316,5324,5339,5405,5449,5451,5479,5662,5696,5697,5718,6062,8560,8802,8820,9063,9399,9400,9518,9575,9626,9837,10760,10788,10841,10856,11578,11589,11592,13911,14099,14101,14140,14255,14256,14677,14678,14836,14839,16013,16015,16019,16022,16121,16122,16125,16169,16170,16215,16216,16219,16221,16353,16354,17174,17194,17399,17811,17926,17927,17935,18002,18192,18228,18234,18236,18239,18250,18282,18283,18346,18378,18380,18381,18535,18540,18669,18672,18673,18740,18741,19277,19279,19280,19349,19353,19354,19355,19497,19515,19516,19517,19518,19589,19931,20052,20078,20261,20262,20267,20292,20293,20298,20299,20326,20327,20328,20329,20330,20403,20465,20635,20636,20760,20843,20902,20934,21270,21274,21275,21287,21289,21290,21291,21367,21378,21380,21381,21569,21587,21589,952,8912,19629)
GROUP BY subtyp2 |