SQL |
SELECT DISTINCT subtyp1, count(distinct style_id) as itemCount
FROM web_all_products
WHERE dept='CLOTHING AND FOOTWEAR' and typ='WOMENS' and upper(subtyp1)<>'EMPTY' and style_id IN (419,439,442,1306,1308,1318,1319,1341,1368,1383,1422,1429,1430,1556,1557,1558,1559,1560,1750,1754,1758,2006,2148,2156,2194,2442,2829,2915,2945,2955,2975,2977,2998,3001,3002,3076,3082,3206,3210,3215,3235,3260,3293,3294,3406,3408,3497,3549,3556,3560,3627,3650,4388,4854,4991,4998,4999,5005,5019,5021,5022,5034,5298,5361,5363,5365,5383,5391,5414,5461,5551,5565,5649,5673,5900,5912,5920,6045,6054,6131,6265,6295,8003,8005,8069,8623,8960,9261,9263,9266,9268,9783,10254,10720,10981,10984,10993,11278,11290,11309,11312,11402,11404,11563,13949,14069,14177,14275,14425,14488,14492,14515,14635,14642,14683,14828,15079,15251,15451,15452,15453,15454,15455,15475,15502,15617,15725,15726,15750,15752,15856,15945,16119,16399,16400,16401,16405,16406,16408,16410,16442,16443,16444,16500,16505,16597,16611,16618,16631,16658,16683,16684,16748,16795,16803,16805,16807,16817,16828,16831,16835,16947,16948,17199,17284,17483,17521,17671,17678,17680,17840,17857,17895,17913,18189,18314,18390,18442,18469,18712,18713,18714,18717,18773,18822,18823,18824,18962,18964,18976,18987,18988,19031,19033,19035,19036,19038,19039,19127,19129,19130,19160,19164,19167,19193,19210,19211,19212,19214,19215,19218,19248,19249,19295,19332,19334,19366,19367,19380,19382,19414,19423,19557,19584,19628,19830,19921,19970,19972,20177,20204,20223,20224,20316,20353,20377,20468,20493,20501,20514,20597,20769,20770,20871,20875,20876,20904,20905,20906,20914,20957,20958,20959,20960,20962,20963,20964,20965,20966,20967,20968,20969,20982,20986,21000,21002,21015,21085,21086,21090,21091,21113,21115,21116,21117,21118,21120,21121,21125,21126,21128,21130,21131,21132,21133,21134,21135,21136,21137,21138,21140,21231,21232,21234,21235,21240,21241,21242,21259,21272,21273,21277,21278,21280,21283,21285,21286,21314,21315,21316,21317,21319,21353,21355,21356,21358,21360,21362,21363,21364,21365,21389,21390,21572,21576,21578,21582,21585,21590,21715,21786,21824,21875,21883,2973,2979,6049)
GROUP BY subtyp1 |