Medidata Solutions Interview Question

Write SQL query based on two tables.