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 (1754,3529,3549,4846,4847,4854,5346,5550,5551,5552,5752,5753,8011,8075,11318,11319,11321,14281,14282,14283,14287,14489,16248,16655,16671,16675,16685,17170,17218,17592,17806,19184,19264,19266,19267,19412,20883,20980,21247,21250,21255,21260,21267,21386,21388,21391,21634)
GROUP BY subtyp2 |