Fractal Interview Question

Normal Sql question from the query.