SQL |
SELECT DISTINCT subtyp2, count(distinct style_id) as itemCount
FROM web_all_products
WHERE dept='CLOTHING AND FOOTWEAR' and typ='WOMENS' and subtyp1='Accessories' and upper(subtyp2)<>'EMPTY' and style_id IN (783,918,930,941,946,950,953,2217,3073,3201,3206,3210,3215,3379,3406,3408,4848,5236,5279,5298,5307,5339,5662,5696,6045,6046,6047,6050,6054,6057,6062,6063,6064,6067,8350,8800,9400,9493,9495,9899,10140,10762,10851,10853,10888,11588,11589,11593,13910,13960,13987,14678,14766,15574,15856,15945,15946,15992,16015,16021,16022,16059,16093,16094,16097,16098,16100,16126,16157,16158,16216,16219,16224,16301,16338,16366,16768,16769,17001,17461,17576,17620,17621,17622,17623,17712,17715,17811,17923,18000,18120,18121,18122,18124,18125,18126,18127,18187,18226,18227,18228,18234,18235,18237,18250,18271,18272,18375,18379,18380,18384,18386,18387,18388,18391,18392,18393,18394,18395,18396,18398,18399,18400,18494,18495,18532,18533,18534,18535,18669,18673,18674,18679,1294,2332,6049)
GROUP BY subtyp2 |