Pregunta de entrevista de QuadraMed

some coding SQL coding question about joining tables