Wise interview question

SQL subquery which uses 3 tables