Spendesk interview question

SQL questions on joins, filtering, query optimisation etc