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,1751,2975,5391,5535,5563,5745,5754,5755,5771,6240,6316,8069,11278,11311,11312,11313,14068,14069,14275,14488,16659,16660,16817,16831,16870,19297,20875,20914,21059,21086,21091,21112,21131,21133,21134,21234,21235,21236,21241,21259,21314,21315,21316,21317,21353,21354,21355,21356,21358,21360,21389,21585,2979)
GROUP BY subtyp2 |