SQL |
SELECT DISTINCT subtyp2, count(distinct style_id) as itemCount
FROM web_all_products
WHERE dept='CYCLING' and typ='BIKES' and subtyp1='Mountain Bikes' and upper(subtyp2)<>'EMPTY' and style_id IN (15038,15956,16271,17529,17600,17608,17698,17703,17765,17919,17966,17995,17996,18075,18077,18078,18164,18165,18193,18362,18365,18660,18661,20031,20165,20166)
GROUP BY subtyp2 |