Capgemini interview question

self join