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,1998,2441,3309,3314,3352,3690,11625,15697,16508,16997,17519,17520,17609,17647,17860,18134,18417,18511,19142,19143,19209,19475,19997,20028,20211,20213,21606,21609,21873,21876,21878,21880)
GROUP BY subtyp2 |