Domanda di colloquio di Payrails

SQL question to join databases and provide a specific output