SQL |
SELECT DISTINCT subtyp2, count(distinct style_id) as itemCount
FROM web_all_products
WHERE dept='MORE...' and typ='SUNGLASSES AND READERS' and subtyp1='Readers' and upper(subtyp2)<>'EMPTY' and style_id IN (2240,17414,17417,17418,17422,17423,17424,17427,17438,17446,17448,17450,18624,18627,18631,18635,18638,21329,21332,21334,21335,21337,21338,21340,21342,21343,21345)
GROUP BY subtyp2 |