Snippets are locked until your enrolment is approved
Production CTE queries, window functions, indexing hints, transaction isolation syntax and schema definitions unlock once your enrolment is verified.
20 snippets
Production schema with UUID primary key, foreign key RESTRICT, generated column, and CHECK constraints.
Expand/contract schema migration pattern to add constrained columns without locking production tables.
Standard multi-table relational join connecting customers to order line items with interval filters.
High-performance anti-join query to find orphan entities or users with zero activity.
Standard deduplication pattern using ROW_NUMBER() to fetch the latest state per entity.
Month-over-month revenue growth calculation using LAG with division-by-zero protection.
Covering index blueprint using INCLUDE to achieve 100% Index-Only Scans.
Lock-free distributed queue worker lease pattern using FOR UPDATE SKIP LOCKED.
Foundational SELECT with column aliases, multi-condition WHERE, and composite ORDER BY.
Three INSERT patterns: single row, multi-row batch, and INSERT FROM SELECT for data archival.
UPDATE with JOIN across tables plus a safe DELETE wrapped in a transaction for rollback protection.
Demonstrates correct AND/OR/NOT precedence with parentheses to avoid silent logic bugs.
Complete filtering toolkit: IN for sets, BETWEEN for ranges, LIKE for patterns, IS NULL for nulls.
Two pagination strategies: simple OFFSET for small tables and keyset pagination for high-volume data.
All five aggregate functions in a single GROUP BY report with LEFT JOIN to include empty departments.
Side-by-side WHERE vs HAVING demonstrating row-level filtering vs group-level filtering after aggregation.
Conditional aggregation with CASE WHEN to pivot row data into columnar status counts per month.
Essential string functions: CONCAT, SUBSTRING with POSITION, TRIM, UPPER/LOWER, LEFT, LENGTH, REPLACE.
Date arithmetic covering interval math, DATE_TRUNC, EXTRACT, and end-of-month with cross-dialect notes.
Safe type conversion with CAST, default-value chaining with COALESCE, and division-safe NULLIF.
Verified LINQ transformations, Regex parsing patterns, DateTime arithmetic and Orchestrator API payloads.