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,7026,7306,7817,9958,10214,10217,10382,10386,10509,10670,11439,14823,14841,15001,15108,15109,15115,15183,15184,15202,15252,15318,15326,15362,16080,16115,16770,17393,17395,17396,17479,17512,17536,17733,17736,17737,17738,17771,17804,17875,17876,17877,18019,18326,18327,18552,18797,18839,19241,19368,19369,19477)
GROUP BY subtyp2 |