Skip to content

Instantly share code, notes, and snippets.

@HarunMbaabu
Last active May 14, 2025 19:29
Show Gist options
  • Select an option

  • Save HarunMbaabu/9e1a59f8aa7396508981ca8a2b08d04c to your computer and use it in GitHub Desktop.

Select an option

Save HarunMbaabu/9e1a59f8aa7396508981ca8a2b08d04c to your computer and use it in GitHub Desktop.

Task

Write a query to identify the manager who has the largest team size. You may assume that there is only one manager with the largest team.

Example

Input:

employees table

Column Type
id INTEGER
name VARCHAR
manager_id INTEGER

managers table

Column Type
id INTEGER
name VARCHAR
team VARCHAR

Output:

Column Type
manager VARCHAR
team_size INTEGER
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment