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,1561,1562,1563,3327,3346,3349,3351,3354,4218,4387,4956,4970,4973,4989,4990,4992,4995,5004,8150,8151,8166,11293,11626,14072,14075,14076,15316,15376,15424,15425,15447,15448,15518,16511,16725,16726,16858,16865,16957,16995,16996,17032,17610,17820,17859,18430,18655,19057,19073,19192,19207,19230,19383,19577,19612,19884,20000,20210,20212,20503,20601,20971,20992,21001,21393,21607,21608)
GROUP BY subtyp2 |