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,3561,3622,3627,5359,5383,5461,5565,5684,6131,6132,6133,6134,6275,9023,9147,9150,9593,9858,11404,14612,15683,16400,16401,16442,16500,16613,16807,16829,16886,16929,17840,17857,17910,19031,19164,19334,19366,19972,20150,20337,20579,20713,20768,20876,20961,21051,21087,21128,21169,21199,21232,21242,21266,21318,21319,21322,21324,21361,21362,21364,21390,21400,21402,21405,21410,21437,21524,21526,21543,21576,21592,21929,21932,21934)
GROUP BY subtyp2 |