I really dont understand the query that was given as answer for this question.
Please explain it in detail. Help giving references.