automated commit by check50 [check50=True]
This commit is contained in:
9
8.sql
9
8.sql
@@ -0,0 +1,9 @@
|
|||||||
|
-- write a SQL query to find the 2001 salary of the player who hit the most home runs in 2001.
|
||||||
|
-- Your query should return a table with one column, the salary of the player.
|
||||||
|
SELECT s."salary"
|
||||||
|
FROM "salaries" AS s
|
||||||
|
JOIN "performances" AS perf
|
||||||
|
ON perf."player_id" = s."player_id"
|
||||||
|
WHERE s."year" = '2001' AND perf."year" = '2001'
|
||||||
|
ORDER BY perf."HR" DESC
|
||||||
|
LIMIT 1;
|
||||||
|
|||||||
Reference in New Issue
Block a user