I have a table that stores questions 1 - 16 and their answers given by users, and grouped by their unique id. For example:
+--------+-----------------+--------+ | number | question_number | answer | +--------+-----------------+--------+ | 1 | 1 | y | +--------+-----------------+--------+ | 1 | 2 | n | +--------+-----------------+--------+ | 1 | 3 | y | +--------+-----------------+--------+ | 2 | 1 | n | +--------+-----------------+--------+ | 2 | 3 | y | +--------+-----------------+--------+ What I want is a SELECT or an INSERT where it will fill the missing values in the sequence. So in the case on 'number' 2, it will fill in question_number 2 and insert a null value for answer. So essentially I want to fill in the gaps for the repeated sequence (in my example's case, 1-3)