Pregunta de entrevista de SG Digital

Write a join SQL query for some records, then optimise it