- Noosaga
- Courses
- Applied Logic & Computing
- SQL & Relational Data
Applied Logic & Computing · Pure-C# SQL Engine & B-Tree Planner
SQL & Relational Data Observatory
Master production SQL from SELECT fundamentals to query optimization across 10 observatory towers: 3-valued NULL & NOT IN pitfalls, LEFT/self joins, GROUP BY & HAVING, set operators, window functions & ROWS BETWEEN frames, WITH RECURSIVE trees, sandboxed DML with FK/CHECK guards, and B-Tree leftmost-prefix EXPLAIN tuning.
- Pure-C# SQL Engine + 4,096 Rows
- 9-Stage Painter2D Visualizer
- Window Frames & Recursive CTEs
- Live B-Tree EXPLAIN Planner
- Practice Towers
- 10
- Guided Floors
- 40
- Crown Rooms
- 10
- Verification
- Live Engine
What You Will Practice
Every query executes against the 8-table Nousfarer Archive (including a 4,096-row indexed catalog) inside a zero-dependency pure-C# SQL engine, lighting up a 9-stage Painter2D relational visualizer (Filter, Join, SemiJoin, Group, Venn SetOp, Window, Recursive Tree, DML Guard, and B-Tree Prism).
Inspect the live execution pipeline bar and interactive Schema Explorer to see why a SARGable covering index runs orders of magnitude faster than a full scan.
- Filtering, 3-valued NULL logic, NOT IN poisoning, and correlated EXISTS/NOT EXISTS
- INNER/LEFT/self joins, GROUP BY/HAVING aggregates, and UNION/INTERSECT/EXCEPT
- Window functions (LAG, LEAD, RANK, DENSE_RANK, NTILE, FIRST_VALUE) & ROWS BETWEEN
- WITH RECURSIVE hierarchies, sandboxed INSERT/UPDATE/DELETE constraints, and B-Tree EXPLAIN tuning
Course Curriculum (10 Towers · 40 Interactive Floors)
- Tower 1
Tower 1 · Querying, Filtering & Sorting
Master SELECT projections, DISTINCT, precision WHERE filters (IN, BETWEEN, LIKE), three-valued NULL & COALESCE, and multi-column ORDER BY + LIMIT.
- SELECT, Aliases & DISTINCT
- Precision WHERE Filters
- NULL Semantics & COALESCE
- Multi-Column ORDER BY & LIMIT
- Tower 2
Tower 2 · Multi-Table JOINs
Weave relational tables together with INNER JOIN, LEFT JOIN, IS NULL anti-joins, 3-table chains, and self-joins.
- INNER JOIN Key Threading
- LEFT JOIN & Unmatched NULLs
- The Anti-Join (LEFT JOIN + IS NULL)
- 3-Table Chains & Self-Joins
- Tower 3
Tower 3 · GROUP BY & Aggregations
Stack rows into GROUP BY buckets, filter aggregates with HAVING, dodge the LEFT JOIN COUNT(*) trap, and build CASE WHEN pivot reports.
- GROUP BY & Core Aggregates
- WHERE vs. HAVING
- The LEFT JOIN COUNT(*) Trap
- Conditional Aggregation (CASE Pivot)
- Tower 4
Tower 4 · CTEs & Window Functions
Write dynamic subqueries, readable WITH CTE pipelines, ROW_NUMBER() per-partition rankings, running totals, and the Chief Archivist Audit.
- Dynamic Scalar Subqueries
- Readable Pipelines With WITH (CTEs)
- Ranking Windows (ROW_NUMBER)
- Running Totals (SUM OVER ORDER BY)
- Tower 5
Tower 5 · Self-Joins & EXISTS
Join a table to itself, run correlated EXISTS semi-joins, dodge the notorious NOT IN + NULL trap, and filter rows against per-group correlated subqueries.
- Self-Joining Hierarchical Tables
- Correlated Semi-Joins With EXISTS
- Defusing the NOT IN + NULL Trap
- Correlated Scalar Subqueries
- Tower 6
Tower 6 · Set Algebra & Pivots
Combine queries vertically with UNION, UNION ALL, INTERSECT, and EXCEPT on the live Venn combiner, and safeguard analytical ratios with NULLIF.
- Deduplicated UNION Across Tables
- Tagged Ledgers With UNION ALL
- Set Difference With EXCEPT
- Safe Ratios With NULLIF
- Tower 7
Tower 7 · Time-Series Windows
Master LAG/LEAD period deltas, tie-aware RANK/DENSE_RANK/NTILE, sliding ROWS BETWEEN moving averages, FIRST_VALUE baselines, and the classic Gaps & Islands Crown!
- Period-Over-Period Deltas With LAG
- Tie-Aware Ranking (RANK, DENSE_RANK, NTILE)
- Rolling 3-Day Moving Average (ROWS BETWEEN)
- Baselines & Lookahead (FIRST_VALUE & LEAD)
- Tower 8
Tower 8 · Recursive CTEs
Generate sequences, fill missing calendar days, walk arbitrary-depth mentorship trees, build root-to-leaf path strings, and aggregate recursive generations.
- Recursive Sequence Generator
- Calendar Gap-Filling With LEFT JOIN
- Traversing the Mentorship Lineage Tree
- Root-to-Leaf Lineage Path Strings
- Tower 9
Tower 9 · Constraints & DML
Mutate sandboxed archive tables with INSERT, UPDATE, and DELETE while satisfying live PRIMARY KEY, FOREIGN KEY, UNIQUE, and CHECK integrity constraints.
- Safe INSERT & Foreign Key Integrity
- Scoped UPDATE & CHECK Constraints
- Safe DELETE & Referential Guards
- UNIQUE Keys & Clean Entity Inserts
- Tower 10
Tower 10 · Indexes & EXPLAIN
Inspect live EXPLAIN plans over the 4,096-row archive_catalog, master composite B-Tree leftmost-prefix seeks, rewrite non-SARGable filters, and hit Covering Index Seeks!
- Reading EXPLAIN: Full Scan vs. B-Tree Seek
- Composite Index Leftmost-Prefix Rule
- SARGable Rewrites (Unwrap Indexed Columns!)
- Covering Index Seeks (Index-Only Reads)
Deterministic Verification & Crown Payoff
Exact Result-Set, Constraint-Guard & EXPLAIN Plan Verification
Verifies exact row/column output, NULL semantics, PK/FK/UNIQUE/CHECK constraint safety, and live B-Tree index usage / SARGability on query-tuning floors.
Supported inputs: Interactive SQL Editor · 9-Stage Relational Visualizer · Schema Explorer · EXPLAIN
Crown Room payoff: Author recursive hierarchy queries, guard relational integrity, and optimize slow scans into covering index lookups across 10 Observatory Crowns.
Practice SQL & Relational Data Inside Nousfarer
Land directly on the SQL & Relational Data Observatory planet inside Nousfarer to climb all 10 interactive towers right in your browser.
Frequently Asked Questions
How does SQL & Relational Data verify my work?
Verifies exact row/column output, NULL semantics, PK/FK/UNIQUE/CHECK constraint safety, and live B-Tree index usage / SARGability on query-tuning floors. Every floor runs deterministically in your browser with immediate feedback — no video pausing or guesswork.
How much content is included in SQL & Relational Data?
The planet spans 10 progressively richer towers (40 guided floors plus 10 Crown Room capstones), paired with Ship Owl spaced-repetition recall whenever you want to sharpen a tricky concept.
What equipment or setup do I need to play SQL & Relational Data?
Everything runs directly inside your browser inside Nousfarer with zero plugins required. Supported inputs: Interactive SQL Editor · 9-Stage Relational Visualizer · Schema Explorer · EXPLAIN.