Interview Query

Manager Team Sizes

14
Have you seen this question before?

Write a query to identify the manager with the biggest team size.

You may assume there is only one manager with the largest team size.

Example:

Input:

employees table

Column Type
id INTEGER
first_name VARCHAR
last_name VARCHAR
salary INTEGER
department_id INTEGER
manager_id INTEGER

managers table

Column Type
id INTEGER
name VARCHAR
team VARCHAR

Output:

Column Type
manager VARCHAR
team_size INTEGER
Next question: Design Poker Schema
.....
MySQL 8.0.17
Loading editor
Use Shift + Enter to run query