Pergunta de entrevista da empresa Skeps

Given a few tables, how can I get this data ? Difference between union and union all.