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,1751,2957,2965,3609,4888,5326,5391,5564,5745,5748,5754,5755,5762,5771,6240,6265,8897,9568,9801,11311,11312,11313,14068,14069,15776,16505,16616,16817,16836,16887,17625,18261,18712,18964,18988,19152,19211,19248,19256,19297,19958,19959,20082,20493,20644,20769,20770,20875,20914,20958,21030,21059,21089,21091,21112,21121,21123,21125,21131,21236,21259,21314,21315,21326,21355,21356,21578,2979)
GROUP BY subtyp2 |