Adeptive Software interview question

An example of recursion as well as some sql