QuadraMed interview question

some coding SQL coding question about joining tables