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,9150,9593,14642,16401,16442,16683,16872,19164,19167,19414,19557,19584,20337,20871,20876,20960,21087,21088,21116,21128,21132,21138,21240,21359,21361,21362,21363,21364,21592)
GROUP BY subtyp2 |