Skip to Content
0 likes
const Assertions for a Fixed Lookup Table Level: Advanced

Freeze a lookup table with as const and derive its keys and values as types. After this, the table and the type that describes it can never drift apart.

0 likes
Walk a Tree With a Recursive CTE Level: Advanced

Walk down an employee tree, walk up to the top, count each manager's team and guard the query against a loop with CYCLE. After this, you can query a parent-child table of any depth.