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 (2915,2922,2945,2977,3073,3497,3529,3549,5337,5346,5550,5551,5552,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,16672,16675,16846,16951,18709,18803,18949,18951,18974,18975,19094,19198,19255,20029,20154,20185,20199,20216,20321,20417,20475,20495,20694,20767,20878,20882,20883,20913,20976,20977,20979,20980,20983,21021,21061,21071,21075,21076,21082,21084,21243,21247,21249,21250,21258,21369,21372,21373,21573,21579,21584,21593,21634)
GROUP BY subtyp2 |