SAP interview question

SQL query