SQL |
SELECT DISTINCT subtyp2, count(distinct style_id) as itemCount
FROM web_all_products
WHERE dept='MORE...' and typ='SUNGLASSES AND READERS' and subtyp1='Sunglasses' and upper(subtyp2)<>'EMPTY' and style_id IN (3246,4918,14034,14042,14043,14045,14049,14050,14051,14053,14054,14055,14058,14901,14930,14932,14933,15162,15163,15168,15169,15171,15315,15386,15391,16230,16231,16234,16285,16286,16347,16738,17509,17510,17659,17660,18795,18796,19433,19434,19435,19436,19692,19694,19695,19696,19697,19698,19699,19700,19701,19702,20822)
GROUP BY subtyp2 |