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,5326,5391,5535,5563,5564,5673,5745,5748,5755,5771,6240,6265,6316,11311,11312,14068,14069,14488,15475,16444,16616,16660,16794,16795,16817,16836,16870,17895,17944,18261,19297,20769,20875,20957,20958,20959,21085,21089,21114,21117,21121,21123,21124,21125,21126,21131,21133,21134,21136,21137,21140,21236,21241,21259,21314,21315,21316,21317,21353,21355,21356,21358,21360,21389,21585,21594,21786,2979)
GROUP BY subtyp2 |