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,1745,1777,2173,2176,2206,2224,2225,2226,2233,2234,3075,3076,3080,3082,3100,3294,3302,5333,5359,5361,5363,5365,5367,5373,5702,6165,8961,9016,9041,11311,14125,14126,14244,14515,15142,15750,15751,15752,15767,16498,16658)
GROUP BY subtyp2 |