SQL |
SELECT DISTINCT subtyp2, count(distinct style_id) as itemCount
FROM web_all_products
WHERE dept='CLOTHING AND FOOTWEAR' and typ='MENS' and subtyp1='Footwear' and upper(subtyp2)<>'EMPTY' and style_id IN (1832,1859,1909,1936,1946,1947,1976,1997,2196,2362,3258,4964,8251,8814,9069,9130,9265,10433,10434,10435,11291,14818,15635,15638,15643,15746,16959,17486,17488,17490,18047,18155,18336,19207,19253,19254,19731,19882,20268,20296,21647)
GROUP BY subtyp2 |