There are a lot of questions and answers about either finding the first 'gap' or the beginning and ending of a gap.
I do not want that. I want to return the first n unused values.
Eg: Suppose I have a table slots
:
slot_id | slot
--------------
1 | 2
2 | 4
3 | 5
4 | 7
The first 5 unused values are 0,1,3,6,8
How would I get that?