1777. 每家商店的产品价格
select
product_id,
sum(if(store='store1',price,null)) store1,
sum(if(store='store2',price,null)) store2,
sum(if(store='store3',price,null)) store3
from
Products
group by
1
select
product_id,
sum(if(store='store1',price,null)) store1,
sum(if(store='store2',price,null)) store2,
sum(if(store='store3',price,null)) store3
from
Products
group by
1