diff --git a/8.sql b/8.sql index e69de29..019acc7 100644 --- a/8.sql +++ b/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;