文章目录
题目
代码(7.20 首刷看解析)
# Write your MySQL query statement below
select p.product_id, p.product_name from (select distinct product_id from Sales
where sale_date between '2019-01-01' and '2019-03-31'
and product_id not in
(select distinct product_id from Sales where sale_date not between '2019-01-01' and '2019-03-31')) t
inner join Product p on t.product_id = p.product_id;