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,3497,3549,4854,5551,5744,14282,14283,14489,16670,16672,16846,17170,17806,19264,19266,19282,20878,20976,20980,21249,21255,21261,21372,21373,21573,21579,21634)
GROUP BY subtyp2 |