Topics / 🗄️ SQL, pandas & Data Analysis / 🗄️ Level 14: SQL Fundamentals

SQL exercise · about 5 minutes · free

JOIN the Tables

Real data lives in many tables. JOIN is how you stitch the story together.

JOIN ... ON matches rows from two tables using a shared key.

SELECT p.name, m.score
FROM players p
JOIN matches m ON m.player_id = p.id
Venn diagram of players and matches. INNER JOIN keeps only rows that match on both sidesplayersmatchesRookieKaiMiaZedAliNovaBot9INNER JOIN keeps only rows that match on both sides
Your quest: Show each player's name and their total score as total_score, highest first.
Starter code
-- join players and matches
-- Run this first to see the players table, then change it to answer the task.
SELECT *
FROM players
LIMIT 5;

Try it in your browser → Free. Sign in with Google to run it. Your code runs on your device.

In this level you'll learn:
More in Level 14: SQL Fundamentals

Share on LinkedIn