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,3550,3599,3604,3620,3637,3638,3666,4898,5471,5652,5653,5671,5763,6176,6357,9460,11316,11376,14674,16418,16422,16423,16676,16677,16822,16845,18295,18809,18811,18978,18980,19157,19200,19273,19411,20186,20339,20879,20880,20978,21080,21245,21246,21257,21371,21374,21375,21379,21382,21574,21577)
GROUP BY subtyp2 |