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,3650,5391,5414,6265,8024,8069,11278,11312,14069,14275,14488,15475,16444,16505,16616,16795,16817,16831,17895,18712,18717,18962,18964,18988,19035,19036,19038,19039,19129,19130,19211,19212,19248,19249,19423,19921,19970,20177,20493,20769,20770,20875,20914,20957,20958,20959,20986,21085,21086,21090,21091,21117,21121,21125,21126,21131,21133,21134,21136,21137,21140,21234,21235,21241,21259,21314,21315,21316,21317,21353,21355,21356,21358,21360,21389,21572,21578,21585,21786,2979)
GROUP BY subtyp2 |