Pregunta de entrevista de Meta

SQL problem with case statements and joins