1082. Sales Analysis II
一、题目描述
Table: Product
Column Name | Type |
---|---|
product_id | int |
product_name | varchar |
unit_price | int |
product_id is the primary key of this table.
Table: Sales
Column Name | Type |
---|---|
seller_id | int |
product_id | int |
buyer_id | int |
sale_date | date |
quantity | int |
price | int |
This table has no primary key, it can have repeated rows.
product_id is a foreign key to Product table.
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.<