Learn SQL
A structured path from zero to confident querying. Practice SELECT, JOINs, GROUP BY, and CRUD with a real SQLite engine running locally in your browser.
1SQL Fundamentals
Introduction to SQL
Learn what SQL is, how relational databases work, and why SQL remains essential for developers, analysts, and data engineers.
Relational Databases & Tables
Understand tables, rows, columns, primary keys, foreign keys, and ER diagrams — the foundation of every SQL query.
2Querying Data
SELECT & FROM — Reading Data
Learn SELECT and FROM to read data from tables, choose columns, use aliases, and remove duplicates with DISTINCT.
WHERE — Filtering Rows
Filter rows with WHERE, comparison operators, AND/OR, IN, BETWEEN, LIKE, and correct NULL checks.
ORDER BY & LIMIT — Sorting & Pagination
Sort results with ORDER BY and paginate with LIMIT and OFFSET for top-N and page-based queries.
SQL COUNT() Function
Count rows with COUNT(*), COUNT(column), and COUNT(DISTINCT). Filter counts with WHERE and preview counting joined tables.
INNER JOIN — Combining Tables
Combine users and orders with INNER JOIN, understand PK/FK links, aliases, and avoid Cartesian products.
SQL CASE Expression
Add conditional logic with searched and simple CASE in SELECT and ORDER BY. Label order statuses and preview conditional aggregates.
GROUP BY & Aggregates
Summarize data with COUNT, SUM, AVG, MIN, MAX, GROUP BY, and HAVING filters on grouped results.
3Joins & Data Modification
LEFT JOIN — Include Unmatched Rows
Keep every user row even when they have no orders. Compare LEFT vs INNER JOIN and find users with zero orders using NULL checks.
Subqueries — Queries Inside Queries
Nest SELECT inside WHERE, FROM, and SELECT clauses. Filter with IN, compare to aggregates, and read scalar subquery results.
INSERT INTO — Adding Rows
Add rows to users and orders with INSERT. Respect primary keys, foreign keys, NOT NULL, and DEFAULT constraints.
UPDATE — Changing Data Safely
Modify existing rows with UPDATE … SET … WHERE. Avoid accidental full-table updates and update joined tables correctly.
DELETE — Removing Rows
Remove rows with DELETE … WHERE. Delete in FK-safe order, compare DELETE vs TRUNCATE, and never drop data without a WHERE clause.
Ready to practice?
Use DevToolsBuilder SQL tools to format, validate, explain, and convert real scripts.
Explore SQL Tools