Finastra interview question

oops,sql queries, puzzles