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,856,2362,2696,3327,3346,3349,3351,3354,3675,3686,3687,3689,3692,4218,4387,4954,4956,4962,4970,4973,4992,4993,5004,8140,8150,8151,8166,8318,8326,8328,11475,11626,11627,14072,14075,14076,15376,15448,15450,15512,15514,15696,16510,16511,16512,16580,16725,16726,16728,16858,16860,16865,16932,16934,16935,16957,16962,16993,16995,16996,17003,17391,17610,17612,17646,17820,17859,18510,18845,18901,19041,19057,19066,19067,19073,19124,19230,19383,19577,19612,19750,19884,19992,19998,20000,20001,20004,20006,20049,20089,20090,20210,20212,20597,20601,20971,20992,21001,21393,21394,21607,21608,21713,21825,21871,21872,21874,21879)
GROUP BY subtyp2 |