SQL |
SELECT DISTINCT subtyp2, count(distinct style_id) as itemCount
FROM web_all_products
WHERE dept='CYCLING' and typ='COMPONENTS' and subtyp1='Brakes' and upper(subtyp2)<>'EMPTY' and style_id IN (6482,6591,6763,6818,7252,7431,7467,7649,7730,7777,8582,8601,8683,10379,11258,11415,14105,14922,14976,14997,15145,15154,15330,15854,15941,15942,16104,17055,17374,17567,17568,17569,17635,17685,17797,17823,17964,18159,18266,18292,18440,18761,19977,20236,20238,20559,20789,17582)
GROUP BY subtyp2 |