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,3638,3664,3666,3669,5471,5652,5653,6176,6257,9145,9149,9377,11316,14619,14620,15539,16112,16418,16423,16676,16832,18295,18978,19200,20409,21078,21080,21170,21191,21244,21245,21248,21256,21374,21375,21382,21385,21392,21425,21426,21481,21534,21945,21952,22227,22416,22565,22751,23277)
GROUP BY subtyp2 |