Headcount and pay check
EasyMicrosoftaggregatesmedianself-referenceshare of total· 20 XP (10 per question)
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.
Question 1: The headline numbers
"In one row: headcount, total payroll, average salary, median salary and the number of managers."
Expected output
- One row;
avg_salaryrounded to a whole number;median_salaryfrompercentile_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 questions and the answer come with Pro.
Question 1 of 2
Write your query here. Ctrl + Enter submits.