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,1751,5535,5563,5564,6240,6316,11311,11313,16659,16660,16794,16836,16870,18709,19161,19297,19555,21089,21112,21114,21123,21124,21236,21354,21357,21594)
GROUP BY subtyp2 |