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 (5346,5550,5551,5552,5553,5643,5719,5744,5752,5753,14281,14282,14283,14287,15499,16248,16655,16670,16671,16672,16675,16685,17592,21061,21071,21075,21076,21082,21084)
GROUP BY subtyp2 |