Pregunta de entrevista de Deutsche Bank

How to connenct two tables in databases in most optimize way?