Pregunta de entrevista de IBM

Advance Java based questions, SQL query