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 (3245,4918,4936,4937,4938,9110,9111,9250,9251,9253,14034,14043,14045,14050,14051,14053,14055,14057,14058,14926,14928,14930,14932,14933,15162,15163,15167,15168,15169,15315,15386,15390,15391,16230,16231,16236,16285,16286,16738,17508,17509,17510,17658,17659,17660,18795,18796,19429,19430,19433,19434,19435,19436,19692,19693,19694,19695,19696,19697,19698,19699,19700,19702,19703,9104)
GROUP BY subtyp2 |