Sendy Interview Question

How to write an SQL query