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,17419,17422,17423,17424,17427,17428,17434,17435,17438,17446,17447,17448,17450,18623,18624,18625,18626,18627,18628,18629,18631,18635,18638,21329,21331,21332,21333,21334,21335,21336,21337,21338,21340,21341,21342,21343,21344,21345)
GROUP BY subtyp2 |