This commit is contained in:
9
2.sql
Normal file
9
2.sql
Normal file
@@ -0,0 +1,9 @@
|
||||
-- write a SQL query to find Cal Ripken Jr.’s salary history.
|
||||
-- Sort by year in descending order.
|
||||
-- Your query should return a table with two columns, one for year and one for salary.
|
||||
SELECT s."year", s."salary"
|
||||
FROM "salaries" AS s
|
||||
JOIN "players" AS p
|
||||
ON s."player_id" = p."id"
|
||||
WHERE p."first_name" = "Cal" AND p."last_name" LIKE "Ripken%"
|
||||
ORDER BY "year" DESC;
|
||||
Reference in New Issue
Block a user