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,3001,3549,4854,5551,5744,14282,14283,14489,16670,16672,16791,17170,17806,19264,19266,19282,20878,20980,21249,21250,21255,21260,21261,21573,21579,21634)
GROUP BY subtyp2 |