Sound Physicians interview question

Write out some SQL queries to achieve some functions.