Headcount and pay check

EasyMicrosoftaggregatesmedianself-referenceshare of total· 20 XP (10 per step)

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.

Step 1: The headline numbers

"In one row: headcount, total payroll, average salary, median salary and the number of managers."

Expected output

  • One row; 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.