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 (328,2182,2219,2342,2960,3515,3544,3589,3599,3620,3623,3664,3666,3669,5471,5763,6176,6257,6312,6357,8077,9024,9145,9149,9377,9460,9620,14619,14620,14624,14692,15127,15539,16112,16822,16832,16956,17288,17850,17851,17856,17908,18295)
GROUP BY subtyp2 |