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 (374,1563,1565,1965,1975,1976,3351,3354,4956,4970,4973,4989,4990,4993,4995,8140,8150,8151,9784,11291,14076,15376,15448,15518,16725,16858,16860,16932,16957,16996,17003,17391,17612,17820,18430,19057,19207,19230,19577,19750,19884,20000,20001,20503,20691)
GROUP BY subtyp2 |