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,3206,3210,3215,3235,3379,3406,3408,5236,5249,5279,5302,5312,5316,5339,5479,5662,5696,6045,6046,6047,6048,6050,6054,6062,6067,6293,8800,9400,9495,9899,10760,10841,10853,10874,10979,10981,10983,10993,11578,11589,11590,11593,13909,13910,14255,14678,14929,15617,15830,15856,15895,15945,16013,16015,16017,16019,16021,16022,16058,16093,16094,16097,16098,16157,16216,16219,16221,16224,16366,16768,16948,17199,17620,17621,17623,17811,18121,18127,18187,18227,18228,18231,18234,18236,18237,18250,18272,18376,18379,18380,18382,18384,18386,18388,18390,18393,18395,18469,18535,18541,18669,18672,18673,18793,19352,19353,19381,19382,19492,19497,19628,20051,20223,20224,20267,20293,20294,20316,20368,20375,20377,20396,20465,20468,20490,20500,20501,20514,20522,20524,20538,20557,20569,20635,20636,20843,21015,6049,19629)
GROUP BY subtyp2 |