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,1776,2172,2205,2221,2222,2223,2232,2235,3088,3089,3090,3091,3092,3093,3094,3095,3104,5360,5362,5364,5473,5625,5706,8791,8869,8919,8928,9021,9022,9045,9046,9060,15523,15761,15844,15845,9355)
GROUP BY subtyp2 |