Visit Health interview question

There was a question on sql