DEV Community

Oliver
Oliver

Posted on

Modeling Multi-Stage Recruitment Funnel Conversion Cohorts in SQL

Hiring pipelines in specialized sectors like construction, civil engineering, and project management—industries served by construction and built-environment job platforms—rarely follow a simple two-step apply-and-hire flow. Candidates move through credential verification, safety certification checks, technical interviews, and site-allocation offers over several weeks.

When product and operations teams ask why time-to-hire is slipping, aggregate stage counts often hide where bottlenecks actually form. Four SQL modeling practices turn raw application event logs into clear cohort diagnostics.


1. Anchor Funnel Metrics to Application Cohort Dates, Not Event Dates

Dividing COUNT(offers_sent_this_week) by COUNT(applications_this_week) produces misleading conversion spikes whenever a large batch of prior-month applicants reaches final review simultaneously.

  • Group every candidate journey by their initial applied_week cohort and track forward milestone timestamps (screened_at, verified_at, interviewed_at, offered_at) on a single wide application_funnel fact row.
  • Compute bounded conversion windows (converted_within_14d, converted_within_30d) so recent cohorts remain comparable against historical baselines.

2. Capture Stage Dwell Time With Window Functions

Knowing that 42% of applicants drop out between credential check and technical interview is useful; knowing that stalled applications sit untouched for 11 days tells operations exactly what to fix.

  • Use LEAD(transitioned_at) OVER (PARTITION BY application_id ORDER BY transitioned_at) over an append-only application_stage_events log to compute exact dwell hours in every stage.
  • Track PERCENTILE_CONT(0.5) and PERCENTILE_CONT(0.9) rather than averages so a handful of frozen requisitions do not skew SLA reporting.

3. Distinguish Candidate Withdrawals From Employer Rejections

Lumping candidate-initiated drop-offs together with qualification rejections blurs actionable signal. Store explicit exit_reason_category dimensions (candidate_withdrew, missing_certification, role_filled, offer_declined) on terminal transitions.


4. Materialize Daily Funnel Snapshots for BI Dashboards

Scanning millions of raw transition events on every dashboard load slows down executive reporting. Refresh a partitioned daily summary table grouped by role_category, region, and cohort_week so BI queries return in milliseconds.

How do you model multi-step funnel cohorts and dwell times in your SQL warehouses? Share your approach in the comments.

Top comments (0)