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,1427,1750,1751,2975,3650,5326,5391,5414,5535,5563,5564,5745,5748,5754,5755,5762,5771,6240,6265,6316,8024,8069,9568,11278,11311,11313,14068,14069,14275,14488,15475,16444,16505,16616,16660,16794,16795,16817,16831,16870,17625,17858,17895,17944,18261,18709,18717,18962,18964,18988,19035,19036,19038,19039,19129,19130,19152,19161,19211,19212,19248,19249,19256,19297,19423,19555,19921,19970,20177,20182,20493,20769,20770,20875,20914,20957,20958,20959,20986,21059,21085,21086,21089,21090,21091,21112,21114,21117,21121,21123,21124,21125,21126,21131,21133,21134,21136,21137,21140,21234,21235,21236,21241,21259,21314,21315,21316,21317,21353,21354,21355,21356,21357,21358,21360,21389,21572,21578,21585,21594,21786,2979)
GROUP BY subtyp2 |