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 (1427,3650,5326,5391,5414,5535,5563,5564,5745,5748,5754,5755,5762,5771,8024,9568,11278,11313,14068,14069,14275,15475,16505,16616,16660,16794,16795,16817,16831,16870,17021,17625,17675,17858,17944,18261,18717,18988,19035,19036,19039,19129,19130,19152,19161,19211,19212,19256,19423,19767,19901,19921,19970,20177,20182,20193,20357,20429,20493,20769,20770,20914,21059,21085,21086,21314,21315,21316,21317,21572,21578,21585,21786)
GROUP BY subtyp2 |