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 (1754,1831,1859,1890,1905,1907,1944,2156,2222,2223,2232,2235,2915,2977,3001,3104,3529,3549,3641,4846,4847,4854,5221,5249,5298,5301,5346,5360,5362,5364,5454,5550,5551,5552,5553,5643,5644,5645,5653,5731,5752,5753,5763,5876,5882,5884,8011,8075,9045,9060,9149,9377,11318,11319,11321,14281,14282,14283,14287,14734,14738,15196,15539,15638,15643,15743,15746,15747,15749,15844,15914,16122,16248,16420,16655,16670,16671,16672,16675,16676,16685,16787,16802,16959,17170,17174,17194,17199,17218,17349,17592,17806,18286,18954,18955,19157,19184,19198,19253,19264,19266,19267,19412,19875,19879,20134,20267,20268,20695,20881,20979,20980,21069,21071,21079,21247,21249,21250,21252,21254,21255,21260,21267,21371,21373,21374,21382,21383,21386,21387,21388,21391,21647,1615)
GROUP BY subtyp1 |