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,3095,3104,5358,5360,5362,5364,9022,9045,9046,9060,14382,15844,17009,18774,20156,20335,20692,20695,20696,21451,21482,21613,21945,9355)
GROUP BY subtyp2 |