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 (358,1753,1754,2895,2922,2961,2995,3073,3497,3521,3529,3543,3549,3658,3663,3673,5337,5346,5433,5550,5551,5552,5643,5719,5722,5733,5752,5753,5772,7989,8011,8030,8529,8535,8543,8904,8908,9544,9718,11318,11362,14281,14282,14283,14622,15499,15540,16248,16655,16919,16951,17017,17218,17852,17896,17901,17902,17930,17932,18951,18975,19255,19267,19833,20026,20029,20153,20154,20185,20302,20303,20321,20352,20417,20495,20628,20882,20913,21075,21247,21267,21376,21377,21388,21573,21579,22050)
GROUP BY subtyp2 |