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 (2182,2342,2960,3515,3537,3544,3589,3599,3620,3623,3625,3664,3666,3669,5652,6176,6357,9145,9149,9377,9460,11376,14619,14620,14624,14692,15539,16112,16418,16422,16822,16832,17019,17288,17850,17851,17908,18295,18809,18811,18954,19194,19411,20074,20075,20186,20322,20339,20385,20409,20457,20623)
GROUP BY subtyp2 |