Your learning path

SQL from the ground up

Start with databases and tables, then write real queries in the practice lab.

24 lessons in orderFree to readBeginner friendly
Start lesson 1 →
  1. LESSON 1 · 3 MIN READ

    What Is a Database? A Beginner-Friendly Explanation

    Almost every app, website, and business system uses a database. When you create an account, your details are stored somewhere.When you buy something online, your order is…

    Open lesson →
  2. LESSON 2 · 9 MIN READ

    How Is Data Stored in a Database?

    Before you learn SQL, you need to understand how data is stored in a database. Many beginners think a database is one big file where everything is…

    Open lesson →
  3. LESSON 3 · 3 MIN READ

    What Is SQL and What Is It Used For?

    SQL is the language people use to communicate with relational databases. This simple guide explains what it does and why it is worth learning.

    Open lesson →
  4. LESSON 4 · 4 MIN READ

    SQL Practice Lab: SELECT, WHERE, GROUP BY and JOIN

    Turn the SQL basics into something you can run. In this practice lab, you will select columns, filter rows, sort results, calculate totals and connect two tables.…

    Open lesson →
  5. LESSON 5 · 4 MIN READ

    SQL SELECT for Beginners: Choose Columns and Name Your Results

    Learn SQL SELECT with a small shop database. Choose columns, use aliases, calculate values and check your results with beginner exercises.

    Open lesson →
  6. LESSON 6 · 4 MIN READ

    SQL WHERE Explained: Filter Rows with AND, OR and IN

    Learn SQL WHERE through clear examples. Combine conditions with AND and OR, use IN and BETWEEN, and avoid common filtering mistakes.

    Open lesson →
  7. LESSON 7 · 4 MIN READ

    SQL ORDER BY and LIMIT: Sort Results and Find the Top Rows

    Sort SQL results with ORDER BY, choose ascending or descending order, handle ties and use LIMIT with a practical top-orders exercise.

    Open lesson →
  8. LESSON 8 · 4 MIN READ

    SQL DISTINCT and NULL: Understand Unique and Missing Values

    Understand SQL DISTINCT and NULL with small examples. Remove duplicate result combinations and handle missing values without misleading counts.

    Open lesson →
  9. LESSON 9 · 4 MIN READ

    SQL Aggregate Functions: COUNT, SUM, AVG, MIN and MAX

    Learn COUNT, SUM, AVG, MIN and MAX in SQL. Check totals, handle missing values and avoid confusing order counts with customer counts.

    Open lesson →
  10. LESSON 10 · 4 MIN READ

    SQL GROUP BY and HAVING: Build Useful Summary Reports

    Build SQL summary reports with GROUP BY and HAVING. Learn the difference between filtering rows and filtering groups with checked examples.

    Open lesson →
  11. LESSON 11 · 4 MIN READ

    SQL INNER JOIN for Beginners: Connect Customers and Orders

    Connect two SQL tables with INNER JOIN. Understand matching keys, one-to-many relationships, aliases and repeated names in query results.

    Open lesson →
  12. LESSON 12 · 4 MIN READ

    SQL LEFT JOIN Explained: Keep Customers with No Orders

    Learn SQL LEFT JOIN with customers who have no orders. Handle NULL, count matches correctly and avoid accidentally turning it into an inner join.

    Open lesson →
  13. LESSON 13 · 4 MIN READ

    SQL CASE WHEN: Create Labels and Conditional Totals

    Use SQL CASE WHEN to label orders and build conditional totals. Learn condition order, ELSE behaviour and a beginner reporting exercise.

    Open lesson →
  14. LESSON 14 · 4 MIN READ

    SQL Subqueries and EXISTS: Answer Questions in Two Steps

    Learn SQL subqueries and EXISTS with above-average orders and customer matching examples. Practise clear two-step reasoning and checked answers.

    Open lesson →
  15. LESSON 15 · 3 MIN READ

    SQL Common Table Expressions: Make a Long Query Easier to Read

    Use SQL common table expressions to break a report into named steps. Build customer totals, filter the summary and check the result.

    Open lesson →
  16. LESSON 16 · 3 MIN READ

    SQL UNION and UNION ALL: Combine Lists Without Surprises

    Combine SQL result lists using UNION and UNION ALL. Understand duplicate removal, compatible columns and final sorting with a small example.

    Open lesson →
  17. LESSON 17 · 3 MIN READ

    SQL Text Functions: Clean Labels Without Changing Their Meaning

    Use SQLite text functions to inspect and clean labels. Practise TRIM, LOWER, LENGTH and SUBSTR while preserving identifiers and original values.

    Open lesson →
  18. LESSON 18 · 3 MIN READ

    SQL Dates in SQLite: Filter a Month and Calculate Day Differences

    Work with SQLite dates using clear ISO values. Filter a month with an exclusive upper boundary and calculate elapsed days with julianday.

    Open lesson →
  19. LESSON 19 · 3 MIN READ

    SQL ROW_NUMBER: Number Rows Within Each Customer

    Learn ROW_NUMBER with a small order table. Keep detail rows, partition by customer and use a deterministic tie-breaker for top-per-group results.

    Open lesson →
  20. LESSON 20 · 3 MIN READ

    SQL Running Totals: Add Values Without Losing the Detail

    Build a SQL running total with SUM OVER. Specify row order and an explicit window frame, then compare cumulative and per-customer totals.

    Open lesson →
  21. LESSON 21 · 3 MIN READ

    Find Duplicate Records in SQL Before You Delete Anything

    Find SQL duplicates with an explicit business key. Distinguish repeated activity from duplicate records and inspect candidates before changing data.

    Open lesson →
  22. LESSON 22 · 3 MIN READ

    Practise SQL UPDATE Safely with a Transaction and ROLLBACK

    Practise SQL UPDATE in a disposable database. Preview the WHERE condition, inspect affected rows and use ROLLBACK to undo the exercise.

    Open lesson →
  23. LESSON 23 · 4 MIN READ

    SQL Table Constraints: Protect Keys and Required Values

    Learn SQL primary keys, NOT NULL, UNIQUE and CHECK constraints. Create a small practice table and understand what constraints can and cannot validate.

    Open lesson →
  24. LESSON 24 · 3 MIN READ

    SQL Report Project: Check a Customer Summary from Start to Finish

    Build a complete beginner SQL report with joins, totals and validation checks. Define the output grain and reconcile customer results to source orders.

    Open lesson →