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,5326,5391,5535,5563,5564,5745,5748,5755,5771,6240,6265,6316,8069,11311,11313,14068,14069,14488,15475,16616,16660,16794,16795,16817,17858,17895,17944,18261,19035,20769,20875,21236,21314,21315,21316,21317,21389,21572,21578,21585,21594,21786,2979)
GROUP BY subtyp2 |