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,2977,3529,3549,5346,5550,5551,5552,5643,5752,5753,8011,8075,11318,11319,11321,11362,14281,14282,14283,16248,16420,16655,16672,16675,16846,19198,20029,20882,20883,20980,21071,21076,21082,21084,21243,21247,21249,21250,21258,21373)
GROUP BY subtyp2 |