Pergunta de entrevista da empresa PAM Group

Presented with some Sql questions and asked to write sql statement for them