automated commit by check50 [check50=True]

This commit is contained in:
daviddoji
2026-04-28 15:40:19 +02:00
parent 3ee6ac7d46
commit 92f9132939
4 changed files with 17 additions and 6 deletions

11
6.sql
View File

@@ -0,0 +1,11 @@
-- write a SQL query to return the top 5 teams, sorted by the total number of hits by players in 2001.
-- Call the column representing total hits by players in 2001 “total hits”.
-- Sort by total hits, highest to lowest.
-- Your query should return two columns, one for the teams names and one for their total hits in 2001.
SELECT t."name", perf."H" AS "total hits"
FROM "teams" AS t
JOIN "performances" AS perf
ON perf."team_id" = t."id"
WHERE perf."year" = "2001"
ORDER BY "total hits" DESC
LIMIT 5;