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,856,2696,2697,3327,3331,3351,3675,3685,3687,4970,8140,8150,8166,8326,10926,11627,14075,14076,15376,15424,15425,15514,15515,16726,16858,16860,16865,16867,16932,16957,16993,16996,17003,17391,17648,18430,18573,19041,19066,19067,19230,19383,19577,19884,19992,20000,20001,20004,20006,20049,20089,20503,20601,20971,20992,21393,21394,21713)
GROUP BY subtyp2 |