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 (1383,3556,3560,3627,5383,5565,5649,5912,6131,8003,8960,11309,11404,11563,14492,14642,15079,16399,16400,16401,16442,16500,16597,16683,16807,16828,17284,17678,17840,17857,18442,18987,19031,19164,19214,19332,19334,19366,19830,19972,20353,20871,20876,20960,21115,21116,21128,21132,21135,21138,21231,21232,21240,21242,21319,21362,21363,21364,21390,21576,21590)
GROUP BY subtyp2 |