Pergunta de entrevista da empresa Deutsche Bank

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