SQL |
SELECT DISTINCT subtyp2, count(distinct style_id) as itemCount
FROM web_all_products
WHERE dept='PADDLESPORTS' and typ='ACCESSORIES' and subtyp1='Paddles' and upper(subtyp2)<>'EMPTY' and style_id IN (20,22,23,28,29,30,31,32,33,34,38,1679,1688,1704,10998,10999,11001,11002,11004,11007,11008,11009,11514,14754,15775,15777,15885,16292,16506)
GROUP BY subtyp2 |