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 (784,1996,2137,2141,2147,2182,2777,2821,3073,3092,3104,3246,3346,3349,3354,3379,3589,3623,3625,3664,3669,3689,4954,4973,4993,4995,5004,5330,5337,5645,5706,5722,5753,5772,5864,5865,5884,8639,8904,9021,9022,9045,9046,9060,9145,9149,9377,9392,10286,10718,10736,11475,11557,11626,13961,14281,14619,14620,14648,14692,14842,14846,15105,15135,15448,15539,15696,15698,15793,16112,16510,16511,16512,16580,16582,16725,16813,16832,16934,16935,16951,16962,16963,16995,17610,17612,17646,17859,18016,18132,18188,18510,18655,18845,18901,18955,18975,19057,19073,19124,19192,19208,19612,19750,19998,20090,20156,20185,20210,20212,20335,20374,20409,20495,20568,20593,20596,20695,20696,20881,20882,21021,21061,21069,21075,21078,21079,21243,21244,21247,21248,21253,21256,21392,21607,21608,21871,21872,21874,21879)
GROUP BY subtyp1 |