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,2176,2194,2206,2224,2225,2226,2233,2234,3076,3077,3080,3082,3100,3293,3294,3302,4888,5361,5363,5365,8961,8962,9041,9062,11311,14125,14244,14515,15750,15752,15760,16498,16505,16658,16817,16879,16884,17913,18773,18813,19160,20337,20684,20686,20697,20698,21582)
GROUP BY subtyp2 |