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,3529,3549,4847,4854,5337,5550,5551,5552,5719,5722,5744,5752,5753,11319,11321,11362,14281,14282,14283,14489,15499,16670,16672,16846,17170,17806,19184,19255,19264,19266,19267,19282,20878,20883,20976,20980,21061,21243,21250,21255,21261,21376,21377,21573,21579,21593,21634)
GROUP BY subtyp2 |