PracHub
QuestionsLearningGuidesInterview Prep

Quick Overview

This question evaluates SQL data-manipulation competencies such as aggregation, NULL handling, deduplication (first-per-group), and computing engagement and quality metrics from event logs.

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

Calculate Survey Response Rate and Quality Metric in SQL

Company: Meta

Role: Data Scientist

Category: Data Manipulation (SQL/Python)

Difficulty: medium

Interview Round: Technical Screen

survey_responses +---------+----------+---------------------+---------------------+-------+ | user_id | survey_id| impression_ts | click_ts | score | +---------+----------+---------------------+---------------------+-------+ | 101 | 555 | 2023-09-01 10:00:00 | 2023-09-01 10:05:12 | 4 | | 102 | 555 | 2023-09-01 10:02:34 | NULL | NULL | | 101 | 556 | 2023-09-02 09:15:20 | 2023-09-02 09:16:00 | 5 | | 103 | 555 | 2023-09-01 10:10:00 | NULL | NULL | | 104 | 557 | 2023-09-03 11:00:00 | 2023-09-03 11:02:45 | 3 | +---------+----------+---------------------+---------------------+-------+ ##### Scenario SQL analysis of in-app survey effectiveness for the travel app. ##### Question Write a query to compute the overall survey response rate, defined as total clicks divided by total impressions. Using the score column, calculate a survey-quality metric. Show two approaches: (a) average every score available, (b) average only the first score a user gave for each survey. Explain which you would choose and why. ##### Hints NULL click_ts means no click; distinct user-survey pairs for first-score logic.

Quick Answer: This question evaluates SQL data-manipulation competencies such as aggregation, NULL handling, deduplication (first-per-group), and computing engagement and quality metrics from event logs.

Last updated: Mar 29, 2026

Loading coding console...

PracHub

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

Product

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

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

  • Compare Survey Satisfaction for New and Established Users - Meta (medium)
  • Calculate Daily Survey Response Rates by Country - Meta (medium)
  • Find A Low-Quality Annotator From Label Data - Meta (hard)
  • Analyze Thirty-Day Ad Performance with SQL - Meta (medium)
  • Compute Each Advertiser's Share of Shop Ad Spend - Meta (medium)