SQL |
SELECT DISTINCT subtyp2, count(distinct style_id) as itemCount
FROM web_all_products
WHERE dept='CYCLING' and typ='ACCESSORIES' and subtyp1='Cool Weather Accessories' and upper(subtyp2)<>'EMPTY' and style_id IN (2140,2159,5794,5795,5796,5836,5859,5894,5895,5917,6427,6770,7092,7396,11548,11558,11618,14906,15932,16180,16181,16237,16490,16491,17148,18501,18681,19316,19317)
GROUP BY subtyp2 |