SQL |
SELECT DISTINCT subtyp2, count(distinct style_id) as itemCount
FROM web_all_products
WHERE dept='CLOTHING AND FOOTWEAR' and typ='WOMENS' and subtyp1='Tops' and upper(subtyp2)<>'EMPTY' and style_id IN (1306,1750,2975,5391,5673,8069,11278,11312,14069,14275,14488,16817,16831,19248,20875,20914,20958,21086,21090,21091,21131,21134,21235,21241,21259,21314,21315,21316,21317,21353,21355,21356,21358,21389,21585,2979)
GROUP BY subtyp2 |