SQL Server T-SQL Mastery: Window Functions, Indexes & Execution Plans
Master window functions, APPLY and PIVOT, then go under the hood of SQL Server: clustered and nonclustered indexes, SARGable predicates, execution plans, statistics, parameter sniffing, isolation levels, locking and safe dynamic SQL, with every answer checked as you go.
- One-time payment
- Instant access right after payment
- Secure checkout with Stripe
About this course
SQL Server T-SQL Mastery takes you from writing correct queries to understanding how SQL Server runs them. In 21 hands-on labs you compute exactly what window functions return, from ROW_NUMBER, RANK and NTILE to running totals, LAG and the LAST_VALUE frame trap, and solve gaps-and-islands, top-N and deduplication tasks with CTEs, APPLY and PIVOT. Then you go under the hood: size B-tree indexes, compare key lookups with covering indexes, spot non-SARGable predicates, read execution plans and histograms, measure parameter sniffing, replay isolation levels and deadlocks, and write dynamic SQL safely. Every answer is checked instantly, and the first lesson is free.
Lessons
- ROW_NUMBER, RANK and DENSE_RANKFree
- Running Totals: ROWS vs the Default RANGE Frame Locked
- Moving Averages with Sliding Frames Locked
- LAG and LEAD: Comparing with Neighbour Rows Locked
- FIRST_VALUE, LAST_VALUE and the Frame Trap Locked
- NTILE, PERCENT_RANK and CUME_DIST Locked
- Top-N per Group and Deduplication with a CTE Locked
- Gaps and Islands: Finding Streaks Locked
- CROSS APPLY and OUTER APPLY Locked
- PIVOT, UNPIVOT and Conditional Aggregation Locked
- Clustered Indexes: Pages, Levels and Seeks Locked
- Nonclustered Indexes, Key Lookups and Covering Locked
- SARGable Predicates: Seek or Scan? Locked
- Reading Execution Plans: Cost and Estimates Locked
- Join Operators: Nested Loops, Merge and Hash Locked
- Statistics and Histograms: How Estimates Are Made Locked
- Parameter Sniffing and Plan Reuse Locked
- Isolation Levels: Dirty Reads and Phantoms Locked
- Locks, Blocking, Escalation and Deadlocks Locked
- Dynamic SQL Done Safely: sp_executesql and QUOTENAME Locked
- Final Project: A Window-Function Sales Report Locked