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,3073,3201,3206,3215,3379,3406,3408,5236,5242,5249,5298,5301,5302,5313,5316,5339,5479,5662,5696,6044,6045,6047,6048,6050,6054,6056,6060,6063,8800,9400,9427,9428,9495,9898,9899,10760,10762,10812,10841,10853,10874,10888,10979,10981,10984,10993,11589,11590,11593,13909,13910,14255,14678,14766,14929,15830,15895,16013,16015,16017,16019,16020,16021,16022,16058,16059,16094,16097,16098,16126,16157,16216,16219,16221,16224,16338,16366,16768,16948,17199,17620,17621,17623,17715,17811,18187,18227,18228,18234,18235,18236,18250,18272,18376,18379,18380,18382,18386,18388,18390,18393,18395,18468,18469,18535,18541,18669,18672,18673,19353,19379,19492,19497,19628,20050,20223,20224,20267,20293,20295,20316,20368,20375,20377,20379,20396,20404,20468,20491,20492,20500,20501,20514,20522,20524,20538,20569,20571,20636,20843,21015,21032,21262,21269,21273,21276,21281,21285,21286,21365,21367,21368,21424,21559,22154,22155,22218,22292,22293,6049,19629)
GROUP BY subtyp2 |