Deutsche Bank Interview Question

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