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,3496,3515,3550,3589,3599,3604,3620,3623,3625,3637,3638,3664,3666,3669,5471,5652,6176,6357,9145,9149,9377,9460,11316,11376,14619,14620,14692,15539,16112,16418,16676,16822,16832,16845,17851,18295,18809,18811,18954,18978,18980,19157,19194,19411,20186,20339,20385,20409,21574,21577,21580)
GROUP BY subtyp2 |