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,1275,7024,7205,9958,10386,10509,10670,14841,15115,15183,15186,15202,16080,16115,16364,16770,17395,17396,17479,17512,17536,17733,17736,17737,17771,17845,17875,17876,17877,18326,18552,18736,18839,19455,19477,19664,19666,19938,19940,20139,20660,20669,21009,21010,21598,21599,21601,21705,21715,21716,21718,21719,21959,21960,21961,21962)
GROUP BY subtyp2 |