Learn / SQL
Track
SQL, query any database.
SQL is how you ask databases questions, and almost every tech job needs it. Every lesson here runs real SQLite in your browser, so you write a query, run it and see the rows, with nothing to install and nothing sent to a server.
- 1Your first query: SELECT
Ask a database for data with SELECT, choose columns, and sort rows with ORDER BY, all in your browser. - 2Filtering with WHERE
Keep only the rows you want with WHERE, text in quotes, number comparisons, AND and OR. - 3Sort and limit
Order results high to low with DESC and keep just the top rows with LIMIT. - 4Count and group
Summarise data with COUNT and GROUP BY, and name a new column with AS. - 5Averages and ROUND
Use AVG, SUM, MIN and MAX to summarise numbers, and tidy long decimals with ROUND. - 6Joining two tables
Combine rows from two tables with JOIN, matching on a shared value, using table aliases.