Thank you this makes a lot of sense
Unfortunately with my specific data there’s an anomaly that prevents this simple approach
The data I have are records that describe a person (including its unique id) and their manager_id but only for a single country.
The country manager (and also approx 0,1% of these country records) have a manager_id that is out of country for which there’s no detailed/full record. Those ids only exist as a manager_id and therefore I am not creating a vertex for them.
What I was thinking is to create a fictitious “abroad” vertex and when I find a record that reports out of country associate the people to this node.
So the only node with zero in-degree will be this “abroad” vertex to which I will have a 0.1% of vertexes referring to of which ONE of them will then have 99.9% of the other vertexes reporting to it. THAT will be the country manager
Not sure how to algorithmically identify it automatically.