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 (825,1562,1565,1965,1975,1996,3346,3349,3351,4218,4954,4962,4970,4989,4993,8150,8151,8166,9784,11293,11475,11626,14072,14075,14076,15447,15448,15696,16510,16511,16582,16725,16726,16858,16860,16865,16957,16962,16963,16995,17003,17032,17612,17820,18430,18510,18539,18655,18901,19057,19066,19067,19073,19124,19125,19192,19208,19230,19383,19612,19750,19884,19992,19998,20000,20001,20006,20089,20212,20503,20603,20752,20971,20992,21001,21393,21394,21713)
GROUP BY subtyp2 |