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,1093,6527,6562,6782,7594,7599,7882,7889,8342,10260,10261,13888,14015,14534,14773,14974,15209,17301,17302,17502,18702,18703,18704,19649,21708)
GROUP BY subtyp2 |