SQL |
SELECT DISTINCT subtyp2, count(distinct style_id) as itemCount
FROM web_all_products
WHERE dept='CYCLING' and typ='COMPONENTS' and subtyp1='Pedals and Cleats' and upper(subtyp2)<>'EMPTY' and style_id IN (6480,6728,6885,7168,7309,7310,7640,7861,7884,8591,8610,8622,8633,8688,8717,10940,11418,11481,13928,14531,14780,15331,15332,15758,15879,16449,17066,17084,17090,17091,17092,17259,17346,17467,17691,17692,17827,18998,19358)
GROUP BY subtyp2 |