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,2148,2156,2915,2922,2977,3001,3260,3408,3497,3549,4854,5225,5298,5346,5360,5362,5364,5454,5551,5652,5653,5744,5763,5876,5882,8011,8075,11318,11319,14282,14283,14287,14489,14683,15844,16148,16248,16420,16655,16670,16672,16675,16676,16802,16845,16846,17170,17199,17218,17348,17349,17592,17806,18190,19157,19184,19264,19266,19282,19412,20878,20879,20880,20883,20913,20977,20978,20979,20980,20983,21071,21076,21084,21249,21250,21255,21258,21260,21261,21267,21369,21371,21372,21373,21374,21375,21382,21386,21391,21570,21573,21577,21584,21634)
GROUP BY subtyp1 |