💡 Suggest New SQL Topics #18
Replies: 1 comment
|
A business case I’d suggest is “correct totals after joining tables with different grains.” For example, give learners one table with one row per order and another with several events per order. Ask them to return both revenue and event counts. A naive join can produce valid-looking SQL while multiplying revenue; the exercise is to declare each table’s grain, aggregate the event side first, and decide how orders with no events should behave. A follow-up could introduce an event redelivery and ask what identifier distinguishes a duplicate delivery from a genuinely new event. For optional browser practice with related synthetic tables, I maintain https://telemetry.sh/sql/lab: free, no account, 18 lessons and 15 tables. It runs DuckDB in the browser, so it is a separate practice resource rather than a drop-in runner for the handbook’s MySQL files. I’m suggesting the exercise above, not claiming it is already included there. Disclosure: I’m JR, creator of Telemetry; AI assisted with this suggestion. |
Uh oh!
There was an error while loading. Please reload this page.
Have an idea that would improve the SQL Engineering Handbook?
Examples:
Share your ideas below.
All reactions