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 (2211,2915,2977,3001,3073,3528,3529,3640,4846,4847,5346,5433,5550,5551,5552,5553,5643,5719,5722,5733,5742,5744,5752,5753,5772,5773,6146,6309,6337,8011,8014,8030,9544,11319,11321,11362,14281,14282,14283,14690,15499,15663,16248,16655,16670,16672,16812,16878,16951,16979,17170,17287,17397,17522,17806,17853,17931,18264,18695,18706,18707,18708,18709,18744,18800,18803,18914,18915,18974,18975,18981,19094,19158,19159,19184,19198,19199,19251,19255,19262,19264,19265,19266,19267,19272,19274,19275,19276,19282)
GROUP BY subtyp2 |