WebMD Health Interview Question

Asked to right SQL queries medium level