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,3000,3086,3560,3622,3627,5383,5461,5565,5912,6131,6132,6133,6134,6275,8960,9023,9147,9150,9593,9858,11404,11563,14612,15079,15508,15683,16143,16399,16400,16401,16442,16500,16613,16807,16829,16886,16929,17840,17857,17956,19031,19164,19167,19334,19366,19591,19972,20150,20337,20353,20579,20713,20768,20876,20961,21051,21087,21128,21232,21242,21318,21319,21322,21324,21361,21362,21364,21390,21576,21590,21592,5684)
GROUP BY subtyp2 |