자료구조 알고리즘/코딩테스트
1777. Product's Price for Each Store
내공얌냠
2022. 6. 18. 10:51
https://leetcode.com/problems/products-price-for-each-store/
Account Login - LeetCode
Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview.
leetcode.com
select product_id,
max(case when store = 'store1' then price end) as store1,
max(case when store = 'store2' then price end) as store2,
max(case when store = 'store3' then price end) as store3
from Products
group by product_id
728x90
반응형