Pergunta de entrevista da empresa Razer

How would you join / perform these queries