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.
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.