IBM interview question

Complete the query with the schema