XYZ interview question

sql basics