SQL |
SELECT DISTINCT subtyp2, count(distinct style_id) as itemCount
FROM web_all_products
WHERE dept='CLOTHING AND FOOTWEAR' and typ='WOMENS' and subtyp1='Footwear' and upper(subtyp2)<>'EMPTY' and style_id IN (826,1556,1560,1956,1992,2006,3309,3352,4388,4960,4991,4998,5005,5026,8152,8246,9783,11625,13949,14073,14828,14829,15454,15502,15881,16628,16727,16748,16861,16866,16958,17519,17520,17609,18185,18186,18314,18417,18427,18429,18538,18822,19009,19042,19076,19613,19994,19997,20213,20507,21002)
GROUP BY subtyp2 |