I will need to perform a recursive SQL query to retrieve all subordinates of a superior X from the following subordination table:
| superior_id | subordinate_id |
|---|---|
| 1080 | 1070 |
| 1080 | 1060 |
| 1070 | 1020 |
| 1070 | 1030 |
| 1060 | 1040 |
The subordinates of the subordinates of superior X are therefore his subordinates too.
I didn't really understand how I could do that by looking at the documentation. That's why I'm asking for your help on one of the simple examples to implement it.
If it helps, my database engine is PostgreSQL, although I think in this case it doesn't change much.
Thanks in advance for your help!