PracHub
QuestionsCoachesLearningGuidesInterview Prep

Quick Overview

This question evaluates skills in relational data aggregation and feature engineering using SQL alongside fitting and interpreting regression models in Python, targeting competencies in transforming event-level user metrics into a modeling dataset and interpreting coefficient estimates.

  • Medium
  • Airbnb
  • Data Manipulation (SQL/Python)
  • Data Scientist

Aggregate User Activity, Fit Regression, Interpret Coefficients

Company: Airbnb

Role: Data Scientist

Category: Data Manipulation (SQL/Python)

Difficulty: Medium

Interview Round: Technical Screen

user_metrics +----------+------------+---------+--------+-----------+ | user_id | activity_dt| variant | clicks | purchases | +----------+------------+---------+--------+-----------+ | 101 | 2023-05-01 | A | 12 | 1 | | 102 | 2023-05-01 | B | 4 | 0 | | 103 | 2023-05-02 | A | 6 | 1 | | 104 | 2023-05-02 | B | 9 | 2 | | 105 | 2023-05-03 | A | 3 | 0 | +----------+------------+---------+--------+-----------+ ##### Scenario Given relational event data, you must write SQL and Python to build a modeling dataset and run a regression. ##### Question Write SQL to aggregate daily user activity into features. 2) In Python, fit a linear (or logistic) regression and interpret coefficients. ##### Hints Use window functions for rolling metrics; in Python rely on pandas and statsmodels or sklearn.

Quick Answer: This question evaluates skills in relational data aggregation and feature engineering using SQL alongside fitting and interpreting regression models in Python, targeting competencies in transforming event-level user metrics into a modeling dataset and interpreting coefficient estimates.

Last updated: Mar 29, 2026

Loading coding console...

PracHub

Master your tech interviews with 8,000+ real questions from top companies.

Product

  • Questions
  • Learning Tracks
  • Interview Guides
  • Resources
  • Premium
  • For Universities
  • Student Access

Browse

  • By Company
  • By Role
  • By Category
  • Topic Hubs
  • SQL Questions
  • AI Coding Questions
  • Compare Platforms
  • Discord Community

Support

  • support@prachub.com
  • (916) 541-4762

Legal

  • Privacy Policy
  • Terms of Service
  • About Us

© 2026 PracHub. All rights reserved.

Related Coding Questions

  • Compute C/T metrics from bookings and visits - Airbnb (Medium)
  • Compute browsing metrics in Python from logs - Airbnb (Medium)
  • Build panel in SQL; run causal regression - Airbnb (Medium)
  • Review a geospatial Python module - Airbnb (Medium)