SQL |
SELECT DISTINCT subtyp2, count(distinct style_id) as itemCount
FROM web_all_products
WHERE dept='CLOTHING AND FOOTWEAR' and typ='MENS' and subtyp1='By Activity' and upper(subtyp2)<>'EMPTY' and style_id IN (429,2146,2148,2156,2162,5454,5875,5876,5882,5900,8623,10254,10281,10720,10729,14374,14683,14684,15958,16802,16804,17808,18509,18811,19260,19268,19269,21246,21715,11356)
GROUP BY subtyp2 |