SQL Server
Indexes, partitions, query plans, and the day-to-day reality of running T-SQL at scale.
-
Lesson 1
What SQL Server actually is, and why you should care
SQL Server in plain English: what the product is, the editions, the licensing gotchas, and which one to install on your laptop today.
-
Lesson 2
Installing SQL Server and connecting with SSMS
Developer Edition on Windows, Docker on Mac or Linux, and picking between SSMS and Azure Data Studio. The 20-minute setup you'll use for the rest of the course.
-
Lesson 3
Databases, schemas, tables: the nesting dolls
The three-level namespace that SQL Server uses to organize everything, what each level is for, and why dbo is not actually your friend.
-
Lesson 4
Data types: the difference between VARCHAR(50) and a lawsuit
VARCHAR vs NVARCHAR, DATETIME vs DATETIME2, DECIMAL vs FLOAT, and the surprisingly expensive consequences of being sloppy about data types in SQL Server.
-
Lesson 5
CREATE, ALTER, DROP: making and breaking tables
DDL basics, IF EXISTS patterns, idempotent scripts, and the 'oh no I dropped prod' drill. Plus how to change a column without breaking the app.
-
Lesson 6
SELECT: asking questions without crying
Projection, aliasing, the logical-query-order secret nobody tells beginners, and why SELECT * is a professional smell. Built around Runehold's order data.
-
Lesson 7
WHERE, NULL, and why your filters lie
Three-valued logic, IS NULL vs = NULL, ISNULL vs COALESCE, and the silent bug every developer writes once. With Runehold customer-support examples.
-
Lesson 8
ORDER BY, TOP, and OFFSET/FETCH
Sorting, paging, TIES, stable sorts, and the one thing everyone gets wrong when they try 'top N rows per group' for the first time.
-
Lesson 9
JOINs: the only diagram you need
INNER, LEFT, RIGHT, FULL, CROSS. Venn-diagram heresy. Semi-joins, anti-joins, and the difference between a JOIN predicate and a WHERE filter.
-
Lesson 10
GROUP BY, HAVING, and aggregates
SUM, COUNT, AVG, DISTINCT aggregates, HAVING vs WHERE, and writing the KPI queries every business actually runs. Revenue, AOV, CAC, LTV explained in SQL.
-
Lesson 11
Subqueries vs CTEs: when to use which
Inline subqueries, derived tables, correlated subqueries, and CTEs. The readability rule, the 'is it the same plan?' myth, and how to refactor a monster query.
-
Lesson 12
Window functions: ROW_NUMBER, LAG, LEAD, SUM OVER
The SQL feature that turns self-joins and correlated subqueries into one-liners. Ranking, running totals, period-over-period deltas, and the OVER clause explained.
-
Lesson 13
UNION vs UNION ALL
Why UNION ALL is faster and why people still write UNION by accident. Plus INTERSECT, EXCEPT, and combining result sets the right way.
-
Lesson 14
String functions: STRING_AGG, STRING_SPLIT, TRIM
Modern T-SQL string handling. Concatenation, splitting, pattern matching, trimming, plus the death of CLR functions for string work.
-
Lesson 15
Date and time: the timezone swamp
DATETIMEOFFSET, AT TIME ZONE, DATEDIFF gotchas, storing UTC vs local, and the EU-specific horror of daylight saving. Why Runehold tags every timestamp.
-
Lesson 16
Common Table Expressions for real: recursive CTEs
Org charts, folder trees, bill-of-materials, and the one-line date-dimension generator. How to think about recursive CTEs without getting lost.
-
Lesson 17
INSERT, UPDATE, DELETE, and why MERGE is dangerous
The four DML verbs, the UPSERT patterns that actually work, the OUTPUT clause, and the long list of reasons to avoid MERGE.
-
Lesson 18
Transactions and the ACID properties
What atomic, consistent, isolated, and durable really mean. BEGIN TRAN, COMMIT, ROLLBACK, SAVEPOINT, and the error-handling patterns that keep data honest.
-
Lesson 19
Isolation levels demystified
READ COMMITTED, SNAPSHOT, SERIALIZABLE, and the four anomalies they prevent. Why SQL Server's default can bite you, and why RCSI is the setting most EU shops should flip on.
-
Lesson 20
Locks, blocking, deadlocks: the daily triangle
Shared, exclusive, and update locks. Finding who blocks whom with sp_who2 and DMVs. Reading deadlock graphs. The retry pattern every production app needs.
-
Lesson 21
Clustered and non-clustered indexes, the way I wish someone had explained them
Why every table wants a clustered index, how to pick the column, what fragmentation actually costs, and the hidden write-amplification of getting it wrong.
-
Lesson 22
Covering indexes and included columns
The key-lookup tax, INCLUDE vs key columns, when to make an index covering, and how to find candidate indexes from missing-index DMVs.
-
Lesson 23
Filtered indexes and columnstore: the niche heroes
When rowstore isn't enough. Filtered indexes for soft-delete + sparse data. Columnstore for warehouse queries. How to pick and when.
-
Lesson 24
Fragmentation, rebuilds, reorgs: the myth of 30%
What Paul Randal actually said, why the default maintenance plan is wrong on SSDs, and how to build a sensible maintenance strategy in 2026.
-
Lesson 25
Reading an execution plan without crying
How SQL Server decides to run your query, how to read the plan it shows you, and the three operators that explain ninety percent of slow queries.
-
Lesson 26
Statistics and cardinality estimation
How the optimizer guesses, when it guesses wrong, the legacy vs modern cardinality estimator, and the DMVs that tell you the truth about your stats.
-
Lesson 27
Parameter sniffing: the bug, the feature, the fix
Why the query is fast in SSMS and slow in the app. OPTIMIZE FOR, RECOMPILE, Query Store plan forcing, and the recent SQL Server features that make this less painful.
-
Lesson 28
Plan cache and Query Store: your time machine
The difference between the plan cache and Query Store. How to find the query that regressed last Tuesday. Forcing plans without code changes.
-
Lesson 29
How partitioning actually works in SQL Server
A walkthrough of partition functions, partition schemes, the sliding-window pattern, and the gotchas nobody warns you about until your overnight job is on fire.
-
Lesson 30
Filegroups, data files, and what the log file is really doing
MDF, NDF, LDF, autogrowth disasters, VLFs, and why full recovery model without log backups is a ticking bomb. The storage layout every DBA should know.
-
Lesson 31
Backups: FULL, DIFF, LOG, and the restore drill
The three backup types, point-in-time recovery, how to test a backup you've never tested, and the schedule every OLTP system should have.
-
Lesson 32
SQL Agent jobs without tears
Scheduling, alerts, operator emails, and the 'my job silently fails' pattern. The Azure SQL equivalent via Elastic Jobs. Building maintenance that actually runs.
-
Lesson 33
Security basics: logins, users, roles
Principals, schemas, the public role trap, least-privilege. Plus GDPR-specific notes for an EU shop.
-
Lesson 34
tempdb: the one shared resource that kills everything
File count, autogrowth, TF 1118, Memory-Optimized tempdb metadata. Why tempdb is everyone's neighbor and how to stop them fighting.
-
Lesson 35
Maintenance plans vs Ola Hallengren
Why every shop eventually throws away the GUI Maintenance Plan and runs Ola's free scripts instead. The exact install + config for a sensible weekly schedule.
-
Lesson 36
DMVs every DBA should know by heart
The eight queries you run on a cold server. Wait stats, blocking, top CPU, top I/O, buffer pool, missing indexes, unused indexes, system overview.
-
Lesson 37
The First Responder Kit: Brent Ozar's gift to humanity
What the kit is, why it's MIT-licensed and free forever, how to install it on every SQL Server you own, and the shape of the tools inside.
-
Lesson 38
sp_BlitzIndex and sp_BlitzCache: the full-body scan
Deep index audit with sp_BlitzIndex. Query plan review with sp_BlitzCache. Reading the output, triaging the 50 things they find.
-
Lesson 39
sp_BlitzCache and sp_WhoIsActive: what's happening RIGHT NOW
Adam Machanic's sp_WhoIsActive is the emergency-response procedure. Plus sp_BlitzFirst for point-in-time wait stats.
-
Lesson 40
A 30-minute SQL Server health check: the script you actually run
The ordered checklist I run on any SQL Server I've never seen before. Printable, pasteable, and the closing lesson of the course.