Medidata Solutions interview question

Write SQL query based on two tables.