Pregunta de entrevista de Stratasan

Solve the follow sql problem by creating a map