SQL |
SELECT DISTINCT subtyp2, count(distinct style_id) as itemCount
FROM web_all_products
WHERE dept='CLOTHING AND FOOTWEAR' and typ='MENS' and subtyp1='Baselayers' and upper(subtyp2)<>'EMPTY' and style_id IN (12,2205,2221,2222,2223,2232,2235,3088,3092,3094,3095,3104,5360,5362,5364,5706,8919,9021,9022,9045,9046,9060,14382,15844,17009,18016,18774,20156,20215,20335,20695,20696,21451,9355)
GROUP BY subtyp2 |