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 (3346,3349,4954,4973,4993,11475,11626,16510,16511,16512,16580,16725,16934,16935,16995,17610,17646,17859,18510,18845,18901,19057,19073,19612,19750,20090,20210,20212,21607)
GROUP BY subtyp2 |