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 (2237,2240,2241,14655,14656,14657,14658,14661,14662,17413,17414,17415,17416,17417,17419,17420,17421,17422,17423,17424,17425,17427,17428,17429,17430,17431,17432,17433,17434,17435,17436,17437,17438,17439,17440,17441,17442,17443,17445,17446,17447,17448,17449,17450,17451,17452,17453,17454,17455)
GROUP BY subtyp2 |