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 (14920,15038,15848,15892,15956,16271,16864,17529,17600,17608,17698,17703,17765,17919,17966,17995,17996,18075,18077,18078,18164,18165,18193,18194,18362,18365,18561,18585,18660,18661,19603)
GROUP BY subtyp2 |