#330

Hiring Managers That Do Not Meet 2&5 Promise

HARDAggregation & WindowsPOSTGRESQL

Problem Description

## Background Recruiting teams track hiring pipeline SLA compliance using event-sourced logs stored in a data warehouse. Each candidate generates a sequence of hiring events captured in `fact_hiring`, with job and manager context in `dim_job_positions`. ## Problem Identify hiring managers who fail to meet the **2&5 Promise** SLA for at least 95% of their candidates. **The 2&5 Promise defines two SLAs per candidate:** - **2-Day Promise:** First response (`ps_scheduled` or `ps_result`) must occur within 2 days of the application event - **5-Day Promise:** Final decision (`os_result`) must occur within 5 days of the application event **Definitions:** - A candidate must have **all three event types** to be counted: `application`, a first-response event, and `os_result` - A candidate is **compliant** only if they meet **both** the 2-day and the 5-day promise - A hiring manager **fails** if fewer than 95% of their complete-sequence candidates are compliant **Return** `hiring_manager_id` and `name` for all failing managers, ordered by `hiring_manager_id` ascending.

Topics

conditional logicaggregationdate functionspercentage calculation

Asked at Companies

amazon

Solve This Problem

Sign up to access the interactive code editor, run test cases, view the editorial, and get AI-powered feedback on your solution.

Start Solving →