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 (1561,1562,1563,1565,1965,1975,2829,3260,4387,4989,4990,4992,5002,9260,9264,9266,9268,9784,11293,15447,15450,15503,15518,16120,16148,17032,17348,17349,17484,18190,19125,20597,21001,21825)
GROUP BY subtyp2 |