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

SQL exercise · about 5 minutes · free

WHERE the Action Is

Filtering early is the cheapest optimisation in data engineering.

WHERE keeps only rows that match. Combine tests with AND / OR.

SELECT name FROM players WHERE level > 20
Table. players: name, level, country; Kai | 12 | India; Mia | 25 | USA; Zed | 31 | UK; Ali | 8 | India; Nova | 19 | India; Bot9 | 40 | USA; Rookie | 1 | UK. Operation: WHERE country = 'India' AND level > 10. Result result: name, level; Kai | 12; Nova | 19playersnamelevelcountryKai12IndiaMia25USAZed31UKAli8IndiaNova19IndiaBot940USARookie1UKresultnamelevelKai12Nova19AND level > 10WHERE country = 'India'
Your quest: Find the name and level of players from 'India' with level above 10.
Starter code
-- filter the players table
-- 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