Advantmed Interview Question

SQL queries for select statement ?