SQL |
SELECT DISTINCT subtyp2, count(distinct style_id) as itemCount
FROM web_all_products
WHERE dept='CLOTHING AND FOOTWEAR' and typ='MENS' and subtyp1='Tops' and upper(subtyp2)<>'EMPTY' and style_id IN (1753,1754,2915,2922,2945,2977,3001,3073,3497,3529,3549,4846,4847,4854,5337,5346,5550,5551,5552,5553,5643,5719,5722,5752,5753,5772,8011,8075,8904,9544,11318,11319,11321,11362,14281,14282,14283,14287,14489,15496,15499,16248,16420,16655,16670,16671,16672,16675,16685,16846,16951,17170,17218,17592,17806,18709,18803,18951,18974,18975,19184,19198,19255,19262,19264,19266,19267,19282,19412,20029,20185,20321,20417,20475,20495,20694,20878,20882,20883,20913,20976,20977,20979,20980,20983,21021,21061,21071,21075,21076,21082,21084,21243,21247,21249,21250,21255,21258,21260,21261,21267,21369,21372,21373,21376,21377,21386,21387,21388,21391,21573,21579,21584,21593,21634)
GROUP BY subtyp2 |