SQL query practice
You solve short query tasks on ready-made datasets such as a library, a shop and a clinic, combining what you learned into one report at the end of each section.
Level 101 · 16 lessons · 15 practice labs
Lessons
Selecting and filtering
- Getting to know the dataset: tables and columns
- Filtering with conditions: AND, OR, IN, BETWEEN
- Searching text and letter case
- Date ranges
- NULL traps
- Short task: a list of overdue books
Grouping
- Counting, summing and averaging
- Grouping and filtering groups
- The five best-selling products
- A monthly trend
- Short task: a quarterly report for the shop
Combining
- Inner and left join exercises
- Finding rows with no match
- Joining three tables
- Simple subqueries
- Capstone: a weekly summary for clinic management
Practice labs
- Filter members in certain districts: List Ilgın Spor members living in three districts using IN.
- Fix a query that mixes AND and OR: Find the filter that returns the wrong members because it lacks parentheses and fix it.
- Search with case and Turkish letters: Find customer names missed because of the letters İ and ı by using a suitable comparison.
- Get last week's appointments: List Akasya Klinik's appointments from last Monday to Sunday.
- Repair a query that misses the month's last day: Fix a report that misses sales on the last day of the month because BETWEEN compares date-times.
- List overdue books with fines: From Defne Kitabevi's loan table, list overdue books with days late and the calculated fine.
- Find customers with no phone: List customers whose phone column is empty or NULL using the right condition.
- Solve why NOT IN returns nothing: Fix a NOT IN query that returns no rows because of a single NULL in the subquery.
- Handle NULLs that skew an average: Show how unanswered survey scores change an average and compare two correct calculations.
- Produce daily sales totals: Calculate daily total and average bill for Tarçın Restoran over the last two weeks.
- Find the five best sellers: Return Gökkuşağı Oyuncak's five best-selling products by units last quarter, with their category.
- Calculate month-over-month growth: Show Kestane Mobilya's monthly revenue and percentage change from the previous month in one report.
- Match doctors with their appointments: Calculate each Akasya Klinik doctor's appointment count this week with a join.
- Find customers who never ordered: Use LEFT JOIN to find customers who never ordered and build a campaign list.
- Join three tables into a report: Produce a weekly revenue report per department from patient, appointment and treatment tables.
About this course
You solve short query tasks on ready-made datasets such as a library, a shop and a clinic, combining what you learned into one report at the end of each section.
What you will learn
- Selecting and filtering
- Grouping
- Combining
Prerequisites
No prior knowledge is needed; the course starts from zero.
Lab environment
Lessons run in your own Kali Linux terminal in the browser, connected to a private lab network. Nothing to install.
Frequently asked questions
- Is this course right for my level?
- The course is at beginner level; every term is explained where it first appears.
- Is there anything to install?
- No. Every lesson runs in your own lab environment that opens in the browser.
- How do lessons work?
- Each lesson has 8 to 10 steps and a short quiz. Early steps show the command to type, later steps give less help; if two attempts fail, the solution opens.
- Can I try it for free?
- Yes. The first three lessons of every course are free.