Gaps with lag
A gap in a numeric sequence shows up as a jump from the previous value.
task
seq_gap(n) lacks some numbers between 1 and 20. Return the first missing number of each gap (4, 11 and 17), using lag().
Run a query to see rows here.
Run EXPLAIN on the statement under the cursor: Plan tab, button Explain.
No tables yet.
A gap in a numeric sequence shows up as a jump from the previous value.
seq_gap(n) lacks some numbers between 1 and 20. Return the first missing number of each gap (4, 11 and 17), using lag().