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,2206,2224,2225,2226,2233,2234,3075,3076,3082,3100,3293,3294,3302,4888,5357,5359,5361,5363,5365,8961,8962,9041,14125,14244,14515,15750,15752,15760,16498,16658,16875,16879,17910,18773,18813,20219,20337,20431,20684,20687,20688,20697,20698,21188,21189,21194,21230,21525,21605,21610,21929,21931,21934)
GROUP BY subtyp2 |