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,5414,6265,11312,14069,14488,16795,16817,17895,18712,20769,20875,20957,20958,21085,21090,21117,21121,21125,21126,21131,21133,21134,21136,21137,21140,21241,21259,21314,21315,21316,21317,21353,21355,21356,21358,21360,21389,21585,21786,2979)
GROUP BY subtyp2 |