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,5337,5346,5550,5551,5552,5643,5719,5722,5752,5753,5772,8904,9544,11318,11319,11321,11362,14281,14282,14283,14287,14489,15496,15499,16248,16655,16670,16672,16675,16846,16906,16951,17287,18803,18974,18975,19094,19255,20029,20154,20185,20199,20216,20321,20417,20458,20475,20495,20694,20767,20913,21021,21061,21369,21573,21579,21584,21634)
GROUP BY subtyp2 |