HealthEdge Software interview question

System design, project related, SQL query