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,354,2205,2221,2222,2223,2232,2235,3088,3092,3094,3095,3104,5358,5360,5362,5364,5625,5706,8869,8919,9021,9022,9045,9046,9060,15523,15844,15845,17009,18016,18774,18812,20156,20215,20216,20335,20340,9355)
GROUP BY subtyp2 |