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,4898,5471,5652,5653,5763,6176,6357,9145,9149,9377,9460,11316,11376,14619,14620,14674,14692,15539,16112,16418,16676,16677,16822,16832,16845,18295,18809,18811,18954,18978,18980,19157,19194,19200,19273,19411,20186,20339,20385,20409,20879,20880,20881,20978,21078,21079,21080,21244,21245,21246,21248,21256,21257,21371,21374,21375,21379,21382,21383,21385,21392,21574,21577,21580)
GROUP BY subtyp2 |