Pregunta de entrevista de Tata Consultancy Services

about basic DBMS, one coding problem,