SQL |
SELECT DISTINCT subtyp1, count(distinct style_id) as itemCount
FROM web_all_products
WHERE dept='CYCLING' and typ='ACCESSORIES' and upper(subtyp1)<>'EMPTY' and style_id IN (1234,2140,2159,3267,5895,6427,6716,6770,7532,8741,10263,10344,10430,10506,10589,10590,10593,10627,11548,11558,14768,14770,15001,15183,15184,15252,15488,15754,15778,15917,15932,16068,16115,16364,16770,17060,17479,18256,18326,18552,18736,19369,19635,19659,19660,19666,19937,20126,20135,20659,20802,20970,21597,21599,21600,21705,21715,21829,21960,21961)
GROUP BY subtyp1 |