1、题目描述
Write an SQL query that reports the buyers who have bought S8 but not iPhone. Note that S8 and iPhone are products present in the Product table.
The query result format is in the following example:
Product table:
product_id | product_name | unit_price |
---|---|---|
1 | S8 | 1000 |
2 | G4 | 800 |
3 | iPhone | 1400 |
Sales table:
seller_id | product_id | buyer_id | sale_date | quantity | price |
---|---|---|---|---|---|
1 | 1 | 1 | 2019-01-21 | 2 | 2000 |
1 | 2 | 2 | 2019-02-17 | 1 | 800 |