DevLearningTools

LEARN · SQL

Learn SQL, one query at a time.

SELECT, WHERE, sorting, joins, window functions, and database design, explained with real queries and example tables you can run yourself. New lessons roll out one at a time.

Learn SQL — a free, plain-English SQL course

1. SQL Basics

2. Operators and Filtering

3. Aggregate Functions

4. Joins

5. Combining and Grouping

6. Subqueries and Advanced SELECT

7. Database and Tables

8. Constraints

9. Data Types

10. Dates, Views, and Security

11. Window Functions

12. Common Table Expressions

13. Indexes and PerformanceSOON

How SQL Indexes Work · Composite and Unique Indexes · EXPLAIN and Execution Plans · Query Optimization Basics

14. Transactions and ACIDSOON

SQL Transactions (COMMIT, ROLLBACK, SAVEPOINT) · The ACID Properties · Transaction Isolation Levels · Transactions in Practice

15. Advanced Aggregate FunctionsSOON

SQL String Aggregation (STRING_AGG / GROUP_CONCAT) · SQL ARRAY_AGG() · SQL JSON_ARRAYAGG() · SQL JSON_OBJECTAGG() · SQL Variance (VAR_POP / VAR_SAMP) · SQL Standard Deviation (STDDEV_POP / STDDEV_SAMP) · SQL MEDIAN() · SQL MODE() · SQL PERCENTILE_CONT() and PERCENTILE_DISC() · SQL Bitwise Aggregates (BIT_AND / BIT_OR / BIT_XOR) · SQL Boolean Aggregates (BOOL_AND / BOOL_OR / EVERY) · SQL APPROX_COUNT_DISTINCT() · SQL CHECKSUM_AGG() · SQL BITMAP_CONSTRUCT_AGG()