Fractal interview question

Normal Sql question from the query.