UST interview question

Program for Fibonacci Inheritance Query for inner join