Skip to content

Add lesson 18: Conditional expressions#58

Merged
exekias merged 1 commit into
mainfrom
lesson/18-conditional-expressions
Jun 11, 2026
Merged

Add lesson 18: Conditional expressions#58
exekias merged 1 commit into
mainfrom
lesson/18-conditional-expressions

Conversation

@exekias

@exekias exekias commented Jun 11, 2026

Copy link
Copy Markdown
Member

Opens Module 5 (Intermediate querying) with a lesson on conditional expressions: searched and simple CASE (bucketing, custom sort orders, NULL behavior with no ELSE), pivot-style conditional aggregation with count(*) FILTER / sum(CASE …), COALESCE fallback chains (display defaults, ORDER BY, join conditions), the value / NULLIF(divisor, 0) divide-by-zero guard, and a brief look at GREATEST/LEAST.

The seed is a small help-desk tickets table (8 rows) deliberately full of NULLs — unassigned tickets, missing contact info, unrated satisfaction, and one ticket with zero agent replies to make the NULLIF guard meaningful. SELECT-only lesson, so no checks per CONTRIBUTING.md.

Note: this PR bootstraps the shared lessons/05-intermediate-querying/module.yaml, which the sibling CTE and window-function PRs create with identical content so they merge cleanly.

Part of #6

🤖 Generated with Claude Code

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@vercel

vercel Bot commented Jun 11, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
learn-postgres Ready Ready Preview Jun 11, 2026 10:04am

@exekias exekias merged commit 7c5abae into main Jun 11, 2026
3 checks passed
@exekias exekias deleted the lesson/18-conditional-expressions branch June 11, 2026 10:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant