Complete the code to start the recursive CTE with the initial value 1.
WITH RECURSIVE numbers AS (SELECT [1] AS nThe recursive CTE must start with the initial value 1, so we select 1 as n.
Complete the recursive part to add 1 to the previous number.
UNION ALL SELECT n [1] 1 FROM numbers WHERE n < 5)
The recursive step adds 1 to the previous number to generate the next number in the series.
Fix the error in the final SELECT to get all numbers from the CTE.
SELECT [1] FROM numbers;The CTE defines a column named 'n', so we select 'n' to get the series values.
Fill both blanks to generate numbers from 10 to 15 using a recursive CTE.
WITH RECURSIVE seq AS (SELECT [1] AS num UNION ALL SELECT num [2] 1 FROM seq WHERE num < 15) SELECT num FROM seq;
The series starts at 10 and increments by 1 until 15.
Fill all three blanks to create a recursive CTE that generates even numbers from 2 to 10.
WITH RECURSIVE evens AS (SELECT [1] AS val UNION ALL SELECT val [2] [3] FROM evens WHERE val < 10) SELECT val FROM evens;
The series starts at 2 and adds 2 each time to get even numbers up to 10.
