SQL |
SELECT DISTINCT subtyp2, count(distinct style_id) as itemCount
FROM web_all_products
WHERE dept='CYCLING' and typ='COMPONENTS' and subtyp1='Saddles' and upper(subtyp2)<>'EMPTY' and style_id IN (1090,1091,1093,6562,6739,6819,6871,7041,7594,7889,7890,8342,10554,14015,14534,14573,14772,14974,15209,17301,17302,17303,17369,17502,17545,18702,18703,18704)
GROUP BY subtyp2 |