Hola interview question

SQL query