Learn Without Walls
← Back to Free Courses

🗄️ SQL Practice Labs

Write real SQL. See real results. No setup required.

10 hands-on labs using SQLite in your browser. Type a query, click Run — results appear as a table instantly.

10 Labs Runs in Browser Free No Installs Real SQLite
Your Progress Loading...

Progress is saved in your browser. No account needed.

💾

Powered by sql.js — SQLite runs right here

No accounts. No downloads. No database server to set up. SQLite runs directly in your browser using sql.js — a full SQLite database engine compiled to WebAssembly. Type a query, click ▶ Run, and your results appear as a real table instantly. Everything stays right here on this page.

📋 Before You Start

Some SQL experience is helpful but not required for Lab 1. Labs build progressively — each one introduces new concepts. Perfect companion to the Data Analyst course. If you’ve seen a SELECT statement before, you’re ready to begin.

10
Labs
40+
Exercises
3
Databases
Free
Always
The 10 Labs

🟦 Foundations — Labs 1–3
Available
1

SELECT & FROM

Ask your first question of a database

Learn the two most fundamental SQL keywords. Query the students table, choose columns, and create calculated fields with aliases.

SELECT FROM aliases *
Open Lab →
Available
2

WHERE: Filtering Results

Find exactly what you're looking for

Filter rows with comparison operators, AND/OR/NOT, IN(), BETWEEN, LIKE wildcards, and IS NULL. Play the role of a financial aid officer.

WHERE AND/OR LIKE IN/BETWEEN
Open Lab →
Available
3

ORDER BY, LIMIT & DISTINCT

Sort, limit, and deduplicate your results

Sort results ascending or descending, restrict output with LIMIT, and eliminate duplicates with DISTINCT. Build a student directory.

ORDER BY LIMIT DISTINCT ASC/DESC
Open Lab →
🟩 Intermediate — Labs 4–6
Available
4

Aggregate Functions

COUNT, SUM, AVG, MIN, MAX

Turn rows into insights. Aggregate across the retail database to answer business questions about orders, revenue, and inventory.

COUNT SUM AVG MIN/MAX
Open Lab →
Available
5

GROUP BY & HAVING

Aggregate by groups — and filter those groups

Group rows before aggregating, then filter groups with HAVING. Master the difference between WHERE and HAVING. Build a sales report.

GROUP BY HAVING WHERE vs HAVING
Open Lab →
Available
6

JOINs: Combining Tables

The most powerful concept in SQL

Combine customers, orders, and products with INNER JOIN and LEFT JOIN. Learn table aliases. Find customers who never ordered.

INNER JOIN LEFT JOIN aliases ON
Open Lab →
🔴 Advanced — Labs 7–10
Available
7

Subqueries

Queries inside queries

Use subqueries in WHERE, FROM, and HAVING clauses. Write correlated subqueries. Query the company database to answer complex HR questions.

subquery IN/EXISTS correlated nested
Open Lab →
Available
8

String & Date Functions

Manipulating text and dates in SQL

Use UPPER, LOWER, SUBSTR, LENGTH, INSTR, strftime, julianday, and CASE WHEN. Format employee names and calculate tenure.

SUBSTR strftime CASE WHEN dates
Open Lab →
Available
9

INSERT, UPDATE, DELETE & CREATE

Not just reading data — writing it too

Create tables, insert rows, update records, and delete data safely. Build a student registration system from scratch. Each page load resets the database.

INSERT UPDATE DELETE CREATE TABLE
Open Lab →
Available
10

Capstone: Full Analysis

A real analyst's workflow — start to finish

No fill-in-the-blanks. Six real business questions from your manager. You write the SQL to answer them using the full company + sales database.

joins aggregates subqueries capstone
Open Lab →

How Each Lab Works

Every lab follows the same structure so you always know what to expect.

📖

Concept Recap

A quick review of the key SQL concepts — no new theory, just a focused reminder before you practice.

👀

Worked Example

A complete, runnable SQL example showing the concepts in action against the lab’s database.

✏️

Guided Exercise

Starter SQL with blanks to fill in. Lower stakes, with hints to get you moving.

💪

Independent + Challenge

Two exercises where you write the SQL from scratch. The challenge pushes further.

🏆

Mini Project

A real-world scenario tying the whole lab together. Multiple queries, one goal.

Technical notes