Say “Hello” to the Table - Repaired
Explore how to write your first SQL query to retrieve data from tables. Learn to select specific columns and filter results, using simple commands like SELECT and FROM. This lesson helps you understand how to ask questions to a database and get meaningful answers.
We'll cover the following...
Welcome to SQL! In the next 2 minutes, you will:
✅ run your first query
✅ personalize it (columns / filter)
✅ pass a 10-second checkpoint
Step 1 — Run your first query
You can press Run to see results, or ask your AI Mentor if you get stuck.
By clicking Run, you ask SQL to show every column and row from the people table.
You should see a table with 4 rows and 4 columns: id, name, age, city. The table is named people.
ID | Name | Age | City |
1 | Aisha | 30 | Karachi |
2 | Dan | 24 | New York |
3 | Fatima | 27 | Lahore |
4 | Lee | 22 | Seoul |
Tip: SQL keywords are case-insensitive (select, SELECT, SeLeCt), and the final semicolon is optional for a single statement.
Step 2 — Make it yours
Can you make a minimal change in the query such that, instead of showing everything from the people table, it shows the data from pets.
Don’t worry about making mistakes. Write the code that you think should make sense. Press Run, and if you don’t see the correct results, try your AI Mentor.
Concept at a glance
SELECT— which columns to show (*means “all columns”).FROM— the table you’re asking (people).Keywords (
SELECT, FROM) aren’t case-sensitive, table names are.The semicolon
;is optional for a single query here.