Pergunta de entrevista da empresa QuadraMed

some coding SQL coding question about joining tables