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,3637,3638,3669,4898,5671,6176,11316,14619,14674,16423,16832,18295,18809,18978,18980,19200,19273,21078,21244,21245,21248,21256,21257,21379,21385)
GROUP BY subtyp2 |