Persistent Systems Interview Question

Again there is a dbms based question which requires self join concept.