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 (8814,8854,9069,15732,15743,15744,15745,15746,15747,15748,15749,15912,15914,16786,16787,18137,18138,18141,18153,18154,18155,18279,18336,18498,19079,19082,19139,19951,19954,20296)
GROUP BY subtyp2 |