SQL |
SELECT DISTINCT subtyp1, count(distinct style_id) as itemCount
FROM web_all_products
WHERE dept='CLOTHING AND FOOTWEAR' and typ='MENS' and upper(subtyp1)<>'EMPTY' and style_id IN (1561,1562,1563,3327,3346,3349,3351,3354,3496,3515,3550,3589,3599,3604,3637,3638,3664,3666,3669,3685,3689,4218,4387,4898,4954,4956,4970,4973,4989,4990,4992,4995,5471,5671,6176,6502,7437,8150,8151,8166,8326,8639,10286,10338,11293,11316,11626,14072,14075,14076,14619,14620,14674,14782,14806,14842,15316,15376,15424,15425,15447,15448,15514,15518,16112,16422,16423,16511,16677,16726,16832,16858,16865,16957,16995,16996,17032,17391,17610,17646,17820,17859,18430,18655,18809,18811,18978,18980,19057,19192,19200,19207,19260,19273,19383,19577,19612,19884,20000,20210,20212,20409,20503,20597,20601,20992,21001,21078,21080,21244,21245,21248,21256,21257,21379,21385,21607,21608,21825,21872,21879)
GROUP BY subtyp1 |