#1136

Each employee's level in the hierarchy

In the org chart emp (employee → manager via manager_id), compute each one's level: the topmost (no manager) is level 1, their reports are 2, and so on down. Return id and depth, ordered by id.

Sampla aschuir a bhfuiltear ag súil leis

Seo é an chuma a bheadh ar fhreagra ceart — tá a líon rónna féin aige, ní gá dó na táblaí scéime a mheaitseáil.

iddepth
11
22
32

Beidh toradh d'iarratais le feiceáil anseo