SQL |
SELECT DISTINCT subtyp2, count(distinct style_id) as itemCount
FROM web_all_products
WHERE dept='CLOTHING AND FOOTWEAR' and typ='WOMENS' and subtyp1='Bottoms' and upper(subtyp2)<>'EMPTY' and style_id IN (5565,5649,9023,16401,16442,16683,19167,19557,19584,20337,20871,20876,20960,20981,21088,21115,21116,21128,21132,21138,21240,21319,21359,21362,21363,21364,21576,21592)
GROUP BY subtyp2 |