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,1752,3086,3556,3560,3622,3627,5383,5565,5649,5912,6131,6132,6133,6134,8003,8960,9023,9147,9150,9593,9858,11309,11404,11563,14612,14642,15079,15472,15508,16143,16399,16400,16401,16442,16500,16597,16683,16807,16828,16872,17284,17678,17840,17857,18442,18844,18985,18987,19031,19164,19214,19331,19332,19334,19363,19366,19591,19830,19972,20150,20337,20353,20579,20713,20871,20876,20877,20981,21087,21088,21231,21232,21240,21242,21319,21390,21576,21590,21592)
GROUP BY subtyp2 |