https://leetcode.com/problems/npv-queries/
select b.id, b.year, IFNULL(a.npv, 0) as npv
from NPV as a
right outer join Queries as b
on a.id = b.id and a.year = b.year
728x90
반응형
'자료구조 알고리즘 > 코딩테스트' 카테고리의 다른 글
1251. Average Selling Price (0) | 2022.06.24 |
---|---|
1565. Unique Orders and Customers Per Month (0) | 2022.06.24 |
740. Delete and Earn (0) | 2022.06.18 |
1777. Product's Price for Each Store (0) | 2022.06.18 |
1623. All Valid Triplets That Can Represent a Country (0) | 2022.06.18 |