Pergunta de entrevista da empresa Meta

Merge these two tables and select a row where this condition is true