Pregunta de entrevista de Atlassian

solving SQL questions and roughly explain the code