Skai interview question

Write a SQL query given table schema