SQL |
SELECT DISTINCT subtyp1, count(distinct style_id) as itemCount
FROM web_all_products
WHERE dept='CYCLING' and typ='BIKES' and upper(subtyp1)<>'EMPTY' and style_id IN (1241,1269,11549,14352,14410,14920,14990,15038,15125,15237,15501,15848,15849,15956,16227,16271,16434,16436,16494,16665,16841,16864,17079,17080,17124,17204,17205,17207,17208,17210,17213,17214,17248,17293,17379,17481,17529,17534,17541,17547,17548,17597,17599,17600,17608,17652,17698,17703,17725,17726,17727,17765,17919,17966,17995,17996,17997,18015,18023,18024,18075,18077,18078,18115,18164,18165,18181,18193,18194,18300,18337,18338,18362,18363,18364,18365,18426,18464,18512,18554,18555,18561,18579,18581,18582,18583,18584,18610,18660,18661,18747)
GROUP BY subtyp1 |