Example for versions Oracle 10g SQL

Pure SQL doesn’t support loops, recursions or user-defined functions. Besides, concatenating fields from multiple rows of a table or a subquery is not a standard aggregate function. This example uses:

Binet’s formula and math functions round , power and sqrt to calculate n-th Fibonacci number;

, and to calculate n-th Fibonacci number; pseudocolumn level to construct a pseudotable t1 containing numbers 1 through 16;

built-in function SYS_CONNECT_BY_PATH to concatenate the resulting numbers in ascending order.