SQL |
SELECT DISTINCT subtyp2, count(distinct style_id) as itemCount
FROM web_all_products
WHERE dept='CYCLING' and typ='ACCESSORIES' and subtyp1='Bags & Panniers' and upper(subtyp2)<>'EMPTY' and style_id IN (1049,1076,1137,1275,7024,7306,7817,9958,10382,10386,10509,10670,14823,14841,15001,15115,15183,15184,15202,15252,15318,15362,16080,16115,16364,16770,17395,17396,17479,17512,17536,17733,17736,17737,17804,17875,17876,17877,18326,18552,18736,18797,18839,19368,19455,19477,19663,19664,19666,19937,19938,19939,19940,20659,20660,20669,21597,21598,21599,21600,21601,21705,21715,21716,21718,21719,21959,21960,21961,21962)
GROUP BY subtyp2 |