Pergunta de entrevista da empresa JMAN Group

Asked a question in SQL from hackerrank, they will ask random querry related to the database and join