SQL |
SELECT DISTINCT subtyp2, count(distinct style_id) as itemCount
FROM web_all_products
WHERE dept='CLOTHING AND FOOTWEAR' and typ='MENS' and subtyp1='Bottoms' and upper(subtyp2)<>'EMPTY' and style_id IN (3496,3515,3589,3599,3604,3620,3638,3664,3666,3669,5471,5652,5653,6176,6257,6357,9145,9149,9377,9460,11316,14619,14620,14692,15539,16112,16418,16423,16676,16832,17851,18295,18811,18978,19200,20186,20339,20385,20409,20457,20623,20881,21078,21079,21080,21170,21191,21244,21245,21246,21248,21256,21371,21374,21375,21379,21382,21385,21392,21416,21425,21426,21481,21534,21945,21952,22227,22416,22565,22751)
GROUP BY subtyp2 |