Pregunta de entrevista de EXL Service

Problem on a database table to solve. Using queries