Handshake interview question

SQL assessment on joins, aggregation, subqueries