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,3293,3294,3302,5359,5361,5365,5702,8961,8962,9041,9055,9062,14125,14126,14244,14515,15750,15751,15752,15760,16498,16505,16654,16658,16817,16879,16884,17615,17707,17708,17913,18178,18773,18813,19160,20197,20198,20219,20337)
GROUP BY subtyp2 |