Mock interview. You're interviewing for a people analytics job on an HR team. The interviewer shares employees and departments. "Finance asked for a quick snapshot of headcount and pay."
A manager is anyone who appears as someone else's manager_id.
"In one row: headcount, total payroll, average salary, median salary and the number of managers."
Expected output
avg_salary rounded to a whole number; median_salary from percentile_cont(0.5)Example of the shape (made-up values):
| headcount | payroll | avg_salary | median_salary | managers |
|---|---|---|---|---|
| 80 | 12000000 | 150000 | 140000 | 20 |
Hints, the later steps and the answer come with Pro.
Step 1 of 2
Write your query here. Ctrl + Enter submits.