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 (358,1753,1754,2168,2208,2211,2945,2946,2977,3073,3497,3528,3529,3640,4846,4852,4854,5548,5550,5551,5552,5553,5596,5655,5719,5722,5742,5744,5752,5753,5772,6309,8011,8014,8030,8038,8073,8543,8545,9544,9651,9669,9880,11319,11362,11373,11545,14281,14282,14283,14286,14287,14303,14305,14489,14491,14560,14690,15498,15526,15663,16239,16419,16420,16421,16447,16601,16671,16672,16674,16675,16685,16791,16812,16825,16826,16833,16846,16849,16854,17171,17172,17173,17175,17176,17177,17178,17295,17296,17397,17456,17592,5664)
GROUP BY subtyp2 |