Add lesson: sorting and pagination#14
Merged
Merged
Conversation
Covers ORDER BY (tie-breakers, NULLS ordering), DISTINCT and DISTINCT ON, LIMIT/OFFSET, and keyset pagination as the production alternative. Renumbers aggregations to 04 to make room in the module sequence. Closes part of #6. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
exekias
commented
May 28, 2026
Comment on lines
+34
to
+40
| ```sql | ||
| SELECT title, published_at | ||
| FROM articles | ||
| ORDER BY published_at DESC NULLS LAST; | ||
| ``` | ||
|
|
||
| The seed has no NULLs in `published_at`, so the syntax is the takeaway here. |
Member
Author
There was a problem hiding this comment.
@copilot update the seed.sql so there are some nulls to make this actionable. Switch from sql block to , like the rest
Contributor
There was a problem hiding this comment.
Addressed in 6403394. I updated seed.sql to include NULL values in published_at and switched that section in lesson.mdx from a fenced SQL block to a runnable <Run> query so the NULLS LAST behavior is directly actionable.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
03-sorting-and-paginationcovering ORDER BY tie-breakers, NULLS ordering, DISTINCT / DISTINCT ON, LIMIT/OFFSET, and keyset pagination.03-aggregationsto04-aggregationsto make room in the module sequence (matches the global ordering in Course curriculum: beginner → expert lesson roadmap #6).02-where-conditionsso it leads into this new lesson.Part of #6.
Test plan
npm run lessons:validatenpx tsc --noEmitnpm run lint/lessons/03-sorting-and-pagination/preview🤖 Generated with Claude Code