I have an answer, but I'm not 100% happy with it. It's not dynamic enough, but I need to do some more digging into Cycles it seems :)
with FIBONACCI (i, FIBO, PREV) as
(
select
1 i, 0 FIBO, cast(null as number) PREV
from
DUAL
union all
select
f1.i + 1 i, f1.FIBO + nvl(f1.PREV,1) FIBO, f1.FIBO PREV
from
FIBONACCI f1
where
f1.i < 35
)
select
sum(FIBO) as "Answer"
from
FIBONACCI
where
mod(FIBO, 2) = 0
order by i;
-----------
Answer: 4613732
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
SQL
I have an answer, but I'm not 100% happy with it. It's not dynamic enough, but I need to do some more digging into Cycles it seems :)