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 (1996,3346,3349,3354,3689,4954,4973,4993,4995,5004,11475,11626,14648,14846,15448,15696,15793,16510,16511,16512,16580,16582,16725,16934,16935,16962,16963,16995,17610,17612,17646,17859,18132,18510,18655,18845,18901,19057,19073,19124,19185,19192,19208,19612,19750,19998,20090,20210,20212,21607,21608,21871,21872,21874,21879)
GROUP BY subtyp2 |