automated commit by check50 [check50=True]

This commit is contained in:
daviddoji
2026-04-28 15:17:31 +02:00
parent 1f5635d664
commit 7c240b208a

12
4.sql
View File

@@ -0,0 +1,12 @@
-- write a SQL query to find the 50 players paid the least in 2001.
-- Sort players by salary, lowest to highest.
-- If two players have the same salary, sort alphabetically by first name and then by last name.
-- If two players have the same first and last name, sort by player ID.
-- Your query should return three columns, one for players first names, one for their last names, and one for their salaries.
SELECT
p."first_name", p."last_name", s."salary"
FROM "players" as p
JOIN "salaries" as s
ON s."player_id" = p."id"
ORDER BY s."salary" ASC, p."first_name" ASC, p."last_name" ASC, p."id" ASC
LIMIT 50;