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 (2816,6480,6885,7168,7190,7309,7310,7640,7690,7751,7883,7884,8610,8622,8642,8643,8717,10940,11418,11481,13928,14531,15332,15758,16403,17084,17090,17092,17467,17692,18998,19358,20123,20333,20732)
GROUP BY subtyp2 |