Square interview question

SQL - sub queries, window functions, aggregate functions, joins, ...