SQLQuokka
Start practicing
QuestionsLearnSandboxFeaturesRoadmapFAQ

Managers With Five Direct Reports

Unsolved

HR wants to identify managers with large teams. An employee reports directly to the person whose id is in their manager_id. Only managers who exist as employees can be reported, so a manager_id that does not match any employee is ignored. Write an SQL query that returns the name of every manager with at least 5 direct reports. Order the results by name 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:
Classic pattern · not tied to a specific company

Submission History

Your recent query executions and answer checks

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