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 (2915,2922,2977,3497,3529,3549,5346,5550,5551,5552,5643,5752,5753,8011,8075,11318,11319,11321,11362,14281,14282,14283,14287,14489,15499,16248,16420,16655,16670,16672,16675,16846,19198,20029,20878,20882,20883,20913,20976,20977,20979,20980,20983,21061,21071,21075,21076,21082,21084,21243,21247,21249,21250,21258,21369,21372,21373,21573,21584,21593,21634)
GROUP BY subtyp2 |