Meta·Data Scientist·Technical Phone Screen
- Given a schema with sites, employees, shuttle service adoption dates, and daily participation records, write SQL to build an individual-day panel for a staggered-adoption difference-in-differences analysis. The output needs employee_id, site_id, date, participated, the site-level adoption date, a treated indicator (1 if on or after adoption date, else 0, with never-treated sites getting NULL adoption and 0), event_time in days relative to adoption, and a post binary. Then also produce a weekly site-level aggregation with average participation rate, correctly handling never-treated sites.
“This wrecked me a little.”