a lot of warehouse bugs come from answering the wrong time question. i explain when you need an as-of result instead of the current row, and three patterns that keep the grain correct.
i break down sql in plain language: what it is, how it evolved over five decades, which problems it solves best, and the core features that keep it relevant
when an entity link to another hub is optional, a naive left join that pulls in an effective satellite in the same from list can explode or blur grain. i isolate the current effective row in a cte and left join that instead.