SQL |
SELECT DISTINCT subtyp1, count(distinct style_id) as itemCount
FROM web_all_products
WHERE dept='CLOTHING AND FOOTWEAR' and typ='MENS' and upper(subtyp1)<>'EMPTY' and style_id IN (12,429,1753,1754,1831,1859,1890,1905,1906,1907,1928,1936,1944,1946,2136,2137,2148,2156,2196,2222,2223,2232,2235,2915,2922,2977,3001,3088,3104,3260,3379,3408,3497,3529,3549,3641,4846,4847,4854,5221,5225,5235,5249,5298,5301,5313,5316,5330,5346,5360,5362,5364,5454,5550,5551,5552,5553,5643,5644,5645,5652,5653,5719,5731,5744,5752,5753,5763,5874,5876,5882,5884,8011,8075,8854,9045,9060,9145,9149,9377,11318,11319,11321,14281,14282,14283,14287,14489,14683,14732,14734,14737,14738,15196,15499,15539,15638,15643,15732,15743,15744,15745,15746,15747,15748,15749,15844,15914,16122,16148,16248,16420,16607,16655,16670,16671,16672,16675,16676,16685,16787,16802,16813,16845,16846,16959,17170,17174,17194,17199,17218,17348,17349,17592,17806,18137,18188,18190,18286,18336,18954,18955,19079,19082,19157,19184,19198,19253,19264,19266,19267,19282,19412,19875,19879,20134,20267,20268,20695,20878,20879,20880,20881,20882,20883,20913,20976,20977,20978,20979,20980,20983,21020,21061,21067,21069,21071,21075,21076,21079,21082,21084,21243,21247,21249,21250,21251,21252,21254,21255,21258,21260,21261,21267,21369,21371,21373,21374,21375,21376,21377,21382,21383,21386,21387,21388,21391,21451,21570,21573,21577,21584,21634,21647,1615)
GROUP BY subtyp1 |