PracHub
QuestionsCoachesLearningGuidesInterview Prep

Quick Overview

This question evaluates data manipulation and analytical skills, including correct SQL join selection, NULL handling, aggregation grain, denominator construction for response rates, and comparative statistics for mean rating differences between cohorts.

  • medium
  • Meta
  • Data Manipulation (SQL/Python)
  • Data Scientist

Calculate Response Rate and Compare User Survey Ratings

Company: Meta

Role: Data Scientist

Category: Data Manipulation (SQL/Python)

Difficulty: medium

Interview Round: Onsite

USERS user_id | signup_date 10 | 2024-03-20 11 | 2024-04-01 12 | 2024-04-05 ​ SURVEYS survey_id | user_id | sent_at 1 | 10 | 2024-04-01 2 | 11 | 2024-04-02 3 | 12 | 2024-04-05 ​ SURVEY_RESPONSES survey_id | user_id | responded_at | rating 1 | 10 | 2024-04-01 10:02 | 4 3 | 12 | 2024-04-05 12:15 | 5 ##### Scenario Using Meta’s notification-survey data, write SQL to (a) compute the survey response rate and (b) test whether new users have a higher average survey rating than existing users. ##### Question Write a query that returns overall response_rate = #responses / #surveys. State and handle your join choice when surveys lack a response. Write a query that compares mean rating between new users (<30 days since signup) and existing users, controlling aggregation level appropriately. ##### Hints Think join type, denominator, NULL handling, aggregation grain, and division-by-zero safeguards.

Quick Answer: This question evaluates data manipulation and analytical skills, including correct SQL join selection, NULL handling, aggregation grain, denominator construction for response rates, and comparative statistics for mean rating differences between cohorts.

Last updated: Mar 29, 2026

Loading coding console...

PracHub

Master your tech interviews with 8,500+ 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

  • Calculate Daily Survey Response Rates by Country - Meta (medium)
  • Compare Survey Satisfaction for New and Established Users - Meta (medium)
  • Find A Low-Quality Annotator From Label Data - Meta (hard)
  • Compute ad impression conversion rates - Meta (medium)
  • Count unconnected posts and reactions - Meta (medium)