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 (429,756,1561,1562,1563,1565,1754,1965,1975,2146,2148,2156,2162,2240,2790,2829,2915,2922,2945,2977,3001,3094,3095,3260,3406,3407,3408,3496,3497,3515,3549,3550,3599,3604,3620,3637,3638,3666,4291,4387,4854,4898,4989,4990,4992,5002,5225,5298,5304,5346,5360,5362,5364,5454,5471,5551,5652,5653,5671,5744,5763,5875,5876,5882,5900,6176,6357,8011,8075,8623,8919,9260,9264,9266,9268,9460,9544,9598,9784,10254,10281,10720,10729,11293,11316,11318,11319,11376,13959,14282,14283,14287,14374,14489,14674,14683,14684,14962,15447,15450,15503,15518,15844,15945,15958,16120,16148,16248,16418,16420,16422,16423,16655,16670,16672,16675,16676,16677,16802,16804,16822,16845,16846,16949,17032,17170,17199,17218,17348,17349,17484,17592,17680,17719,17720,17806,17808,18190,18295,18423,18466,18509,18774,18809,18811,18947,18951,18974,18978,18980,19125,19157,19184,19198,19200,19260,19262,19264,19266,19268,19269,19273,19282,19411,19412,20053,20054,20186,20221,20339,20342,20376,20378,20382,20498,20597,20878,20879,20880,20883,20913,20976,20977,20978,20979,20980,20983,21001,21071,21076,21080,21084,21245,21246,21249,21250,21255,21257,21258,21260,21261,21267,21268,21369,21371,21372,21373,21374,21375,21379,21382,21386,21391,21570,21573,21574,21577,21579,21584,21634,21715,21825,11356)
GROUP BY subtyp1 |