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,7310,7640,7690,7751,7883,7884,7887,8591,8610,8622,8643,8671,8717,10940,11418,13928,15332,15758,16403,17084,17092,17467,18998,19358,20123,20333,20732)
GROUP BY subtyp2 |