← FactorSir

SQL and databases

Ask questions of data in tables: filter, sort, count, group and join, then create and change tables.

Start learning

1. Databases and your first query

What tables, rows and columns are, and how SELECT reads them.

2. Filtering rows with WHERE

Keep only the rows you care about.

3. Sorting and shaping results

Sort, take the top few, remove repeats and calculate new columns.

4. Missing values: NULL

How databases mark "unknown", and how to handle it.

5. Summarizing with aggregate functions

Count, add up and average many rows into one answer.

6. Grouping: GROUP BY and HAVING

One summary per group, and filtering the groups.

7. Joining tables

Combine rows from two or three tables using keys.

8. Subqueries, CASE and dates

Queries inside queries, if-then labels, and working with dates.

9. Creating and changing data

CREATE TABLE, INSERT, UPDATE and DELETE, safely.

10. Designing databases and a final project

Keys, relationships and avoiding duplicates, then answer real business questions.