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,4923,4924,4934,4936,4937,4938,4948,9110,9111,9125,9126,9250,9251,9253,9256,9257,14034,14040,14041,14042,14043,14044,14045,14046,14047,14048,14049,14050,14051,14053,14054,14057,14058,14059,14900,14926,14927,14928,14930,14932,14933,15162,15165,15166,15167,15168,15169,15171,15172,15174,15175,15315,15386,15387,15390,15391,16285,16738,16739,17373,17506,17507,17508,17509,17510,9104)
GROUP BY subtyp2 |