SQL from Scratch
Цикл для тех, кто не писал ни одного запроса: что такое база данных, SELECT и фильтры, JOIN, агрегаты, оконные функции, NULL, безопасное изменение данных и первое понимание индексов.
Behind every application stands a database, and the ability to ask it a question directly is the skill that separates a specialist from a user. This series is for those who haven't written a single query yet: no prerequisites, one running example of an online store.
Eight articles go in order — each builds on the previous ones:
- What a database and tables are — the DBMS, rows and columns, the primary key and relationships.
- SELECT: pick, filter, sort — WHERE, LIKE, IN, ORDER BY, LIMIT.
- JOIN: combine data from several tables — INNER and LEFT, lost and duplicated rows.
- Aggregates: COUNT, GROUP BY and HAVING — answering "how many" and "for what total."
- Window functions — ROW_NUMBER and PARTITION BY: counting without collapsing rows.
- NULL and data types — where everyone stumbles, from IS NULL to time zones.
- INSERT, UPDATE, DELETE and transactions — how to change data without causing a disaster.
- Why a query is slow: indexes on your fingers — the full scan, the index as a table of contents, EXPLAIN.
The series is part of the "Manual testing from scratch" program as a separate phase, yet self-sufficient: SQL is equally needed by a tester, an analyst, and a beginning developer. The continuation for those who want more is the PostgreSQL section.