Skip to content

Commit 4ff0281

Browse files
authored
Create npv-queries.sql
1 parent 207965f commit 4ff0281

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

MySQL/npv-queries.sql

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Time: O(n)
2+
# Space: O(n)
3+
4+
SELECT a.id,
5+
a.year,
6+
Ifnull(b.npv, 0) AS npv
7+
FROM queries a
8+
LEFT JOIN npv b
9+
ON a.id = b.id
10+
AND a.year = b.year;

0 commit comments

Comments
 (0)