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 (3,696,756,764,784,918,930,946,947,950,953,2777,2790,2791,3098,3379,3405,3406,3407,3408,3797,4291,5221,5225,5235,5236,5249,5269,5270,5298,5299,5300,5301,5302,5304,5309,5313,5316,5324,5339,5405,5449,5451,5479,5662,5695,5696,5718,6062,8560,8802,8820,8867,9063,9399,9400,9518,9575,9624,9626,9837,9898,10760,10788,10841,10856,10874,10877,11578,11589,11592,13911,13959,13961,14099,14101,14124,14140,14255,14256,14678,14766,14836,14839,15852,15893,15945,16013,16015,16017,16019,16021,16022,16121,16122,16125,16157,16169,16215,16216,16219,16221,16353,16768,16949,17174,17194,17199,17399,17624,17709,17710,17713,17719,17720,17811,17926,17927,17935,18002,18188,18192,18227,18228,18234,18236,18239,18250,18282,18283,18346,18378,18380,18381,18423,18466,18467,18496,18522,18535,18540,18669,18672,18673,18740,18741,19277,19279,19280,19309,19353,19354,19355,19492,19497,19516,19518,19589,19831,19931,20053,20054,20078,20221,20261,20262,20267,20292,20293,20294,20298,20299,20317,20326,20327,20328,20329,20330,20373,20374,20376,20382,20403,20465,20497,20498,20499,20522,20593,20635,20636,20760,20843,21031,21032,21262,21263,21264,21270,21275,21289,21291,21367,21378,21381,21569,21586,21589,8912,10875,19629)
GROUP BY subtyp2 |