SQL |
SELECT DISTINCT subtyp2, count(distinct style_id) as itemCount
FROM web_all_products
WHERE dept='CYCLING' and typ='ACCESSORIES' and subtyp1='Helmets' and upper(subtyp2)<>'EMPTY' and style_id IN (1234,1285,3263,3267,3275,6772,8701,10344,10407,10513,10514,10526,10666,10724,10725,10738,10739,11609,13892,13893,14536,14741,14767,14768,14770,14771,15034,15343,15644,15754,15954,16987,17238,17551,17552,17553,17654,17661,17684)
GROUP BY subtyp2 |