SQL |
SELECT DISTINCT subtyp2, count(distinct style_id) as itemCount
FROM web_all_products
WHERE dept='CLOTHING AND FOOTWEAR' and typ='WOMENS' and subtyp1='Baselayers' and upper(subtyp2)<>'EMPTY' and style_id IN (1744,1777,2173,2176,2194,2206,2224,2225,2226,2233,2234,3075,3076,3077,3080,3082,3100,3294,3302,5359,5361,5365,5367,5702,8961,8962,9016,9041,9055,9062,14125,14126,14244,14515,15750,15751,15752,15760,16498,16654,16658,16879,17615,17707,17708,17913,18178,18773,18813,18814,18815,19160,19170)
GROUP BY subtyp2 |