By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
WITH
odd_num_cte (id, n) AS
(
SELECT 1, 1
UNION ALL
SELECT id+1, n+2 from odd_num_cte where id < 5
)
SELECT * FROM odd_num_cte;
id | n |
---|---|
1 | 1 |
2 | 3 |
3 | 5 |
4 | 7 |
5 | 9 |