SQL |
SELECT DISTINCT subtyp2, count(distinct style_id) as itemCount
FROM web_all_products
WHERE dept='CLOTHING AND FOOTWEAR' and typ='MENS' and subtyp1='Tops' and upper(subtyp2)<>'EMPTY' and style_id IN (1753,2922,2945,2961,2977,2995,3073,3497,3521,3528,3529,3543,3564,3658,3673,4846,5337,5346,5433,5550,5552,5643,5719,5722,5733,5742,5752,5753,5772,5773,7989,8029,8030,8543,8545,9544,9718,9822,11362,14281,14287,15422,15496,15499,15527,16085,16248,16655,16905,16919,16946,16951,16954,17287,17522,17852,17853,17862,17896,17897,17899,17901,17930,17958,18264,18353,18706,18707,18801,18803,18949,18951,18974,18977,19094,19255,19282,19832,19833,20026,20029,20073,20151,20152,20153,20154,20185,20199,20200,20216,20245,20321,20323,20324,20350,20351,20352)
GROUP BY subtyp2 |