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 (3263,3267,6772,8701,10344,10407,10514,10666,10724,10739,11609,13893,14536,14741,14768,14770,14771,15034,15754,15954,17238,17551,17553,17654,17661,17684,19635)
GROUP BY subtyp2 |