XYZ interview question

sequence of SQL of a query