Skip to content

Latest commit

 

History

History
29 lines (19 loc) · 509 Bytes

File metadata and controls

29 lines (19 loc) · 509 Bytes

English Version

题目描述

None

解法

SQL

SELECT s.buyer_id
FROM Sales s
JOIN Product p
    ON s.product_id = p.product_id
GROUP BY  s.buyer_id
HAVING sum(p.product_name='S8')>0
        AND sum(p.product_name='iPhone')=0