Pregunta de entrevista de Lumenalta

Three programming questions: one SQL, one to do with sorting, another about setting up a port structure.