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,9256,14034,14041,14042,14043,14044,14045,14048,14050,14051,14053,14054,14055,14057,14058,14900,14926,14927,14930,14932,14933,15162,15163,15167,15168,15169,15172,15174,15315,15386,15390,15391,16230,16231,16236,16285,16286,16347,16738,17508,17509,17510,17658,17659,17660,18796,18934,19429,19430,19432,19433,19434,19435,19436,9104)
GROUP BY subtyp2 |