What is the best way to query data from Table if a Table is dependent to itself in Postgresql
I need to fetch data like the below: select u.id from public.user u where u.reporting_id in (select u.id from public.user u where u.reporting_id = ?) is there any best way of doing same in PostgreSQL