SQL |
SELECT DISTINCT subtyp2, count(distinct style_id) as itemCount
FROM web_all_products
WHERE dept='CYCLING' and typ='COMPONENTS' and subtyp1='Tubes' and upper(subtyp2)<>'EMPTY' and style_id IN (6392,6448,6512,6530,6561,6580,6937,6987,7007,7550,7642,7878,10394,11437,11448,14705,14955,15134,15246,15380,15757,15788,15948,15949,15957,18425,19201,19203,19513)
GROUP BY subtyp2 |