Pergunta de entrevista da empresa Bloomberg

Write a SQL query with criterion where if there is this table and other table