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,17413,17414,17416,17417,17419,17420,17422,17423,17424,17427,17428,17430,17431,17434,17435,17436,17437,17438,17439,17442,17445,17446,17447,17448,17449,17452,17454,17455,18623,18624,18626,18627,18628,18631,18635,18638)
GROUP BY subtyp2 |