MessageMedia interview question

Solving SQL queries