SQLQuokka
Start practicing
QuestionsLearnSandboxFeaturesRoadmapFAQ

Org Chart Downstream Reports

Unsolved

LinkedIn's org-chart feature needs to list everyone in a manager's downstream organization. For the manager named `Dana Cole`, return all direct and indirect reports (reports of reports, and so on), but not Dana herself. For each person return `member_id`, `member_name` and `depth`, where direct reports have depth 1, their reports depth 2, and so on. Order the results by `depth` ascending, then `member_id` ascending.

SQL Query Editor (Ctrl+Enter to run)
0 characters · Valid
Canonical Solution Official

Official Solution is Hidden

Try solving the question with the schema explorer and hints first. When ready, reveal the verified canonical query and step-by-step logic breakdown.

Community Q&A & Discussion

Ask questions, share alternate queries, and explore solutions

0 comments
Asked By:
🏢 LinkedIn🏢 Workday🏢 Microsoft

Submission History

Your recent query executions and answer checks

Execution Pipeline:
FROM org_members
Full source dataset
11 rows total
Ready. Type a query to see live execution.
Clause: Auto-Sync · AlaSQL Engine