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,946,950,953,2332,2779,3073,3201,3215,3379,3406,3408,5221,5236,5249,5298,5301,5302,5307,5313,5316,5339,5479,5662,5696,6045,6046,6047,6048,6050,6054,6062,6067,8800,9400,9495,9898,9899,10760,10841,10853,10874,10979,10981,10984,10993,11578,11589,11590,11593,13909,13910,14255,14678,14766,14929,15830,15856,15895,15945,16013,16015,16017,16019,16021,16022,16058,16092,16093,16094,16097,16098,16126,16157,16216,16219,16221,16224,16366,16768,16948,17194,17199,17620,17621,17623,17811,18187,18227,18228,18234,18236,18237,18250,18376,18379,18380,18382,18384,18386,18388,18390,18393,18395,18468,18469,18535,18541,18669,18672,18673,19353,19379,19492,19497,19628,20050,20051,20223,20224,20267,20293,20294,20316,20368,20375,20377,20396,20404,20465,20468,20490,20500,20501,20514,20522,20524,20538,20569,20635,20636,20843,21015,21032,21262,21269,21273,21276,21281,21285,21286,21365,21367,21368,6049,19629)
GROUP BY subtyp2 |