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,1754,3073,3497,3521,3529,3543,3549,3573,5337,5346,5433,5552,5719,5722,5733,5752,5753,5772,5777,7989,8011,8030,8908,9718,11318,14281,14282,14283,16248,16655,17017,17852,17901,17902,18951,19255,19833,20029,20154,20352,20417,20483,20767,20913,20989,21075,21190,21192,21210,21218,21228,21247,21267,21376,21377,21388,21411,21412,21418,21420,21446,21449,21450,21497,21498,21500,21502,21551,21554,21557,21573,21946,21953,21958,21964,21988,22050,22174,22749,22753,22754,22756)
GROUP BY subtyp2 |