Qcue interview question

Write a SQL query.