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 (6408,6480,7168,7190,7309,7310,7640,7751,7861,7883,7884,7887,8610,8622,8642,8643,8671,8688,11418,13928,15758,16403,17084,17092,18998,19358,20123,20732,22277)
GROUP BY subtyp2 |