SQL |
SELECT DISTINCT subtyp2, count(distinct style_id) as itemCount
FROM web_all_products
WHERE dept='CYCLING' and typ='COMPONENTS' and subtyp1='Chains' and upper(subtyp2)<>'EMPTY' and style_id IN (6455,6811,7110,7170,7438,7630,7784,7800,7847,8590,8600,8618,8620,8663,8703,14188,16255,16402,17586,17639,17681,17965,18439,18835,19678,19706,19713,20069,20778)
GROUP BY subtyp2 |