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 (11566,15038,15956,16271,17600,17608,17653,17698,17703,17765,17966,17995,18075,18078,18105,18164,18165,18193,18362,18365,18612,18661,19603,20031,20165,20166,20605,20839,21055,21056)
GROUP BY subtyp2 |