PracHub
QuestionsPremiumCoachesLearningGuidesInterview Prep

Quick Overview

This question evaluates SQL-based data manipulation skills including joins, aggregation, temporal filtering, and audience segmentation to calculate viewing-time and reaction metrics.

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

Analyze Recent Post Performance Using SQL Queries

Company: Meta

Role: Data Scientist

Category: Data Manipulation (SQL/Python)

Difficulty: Medium

Interview Round: Technical Screen

INFO_STREAM_VIEWS +---------+-----------+--------------+----------+------------+ | post_id | viewer_id | relationship | duration | ds | +---------+-----------+--------------+----------+------------+ | 1 | 101 | Friend | 75.2 | 2023-08-10 | | 1 | 102 | Unconnected | 45.0 | 2023-08-10 | | 2 | 103 | Followee | 120.5 | 2023-08-11 | | 3 | 104 | Unconnected | 65.0 | 2023-08-11 | | 4 | 105 | Friend | 30.0 | 2023-08-12 | +---------+-----------+--------------+----------+------------+ ​ POST_REACTIONS +---------+-----------+-------------+------------+ | post_id | viewer_id | post_action | ds | +---------+-----------+-------------+------------+ | 1 | 101 | like | 2023-08-10 | | 1 | 102 | comment | 2023-08-10 | | 2 | 103 | reshare | 2023-08-11 | | 3 | 104 | like | 2023-08-11 | | 3 | 104 | comment | 2023-08-11 | +---------+-----------+-------------+------------+ ##### Scenario Social-content feed needs SQL to report recent performance of posts. ##### Question Q1. Write a query to count posts that received >60 seconds of viewing time from unconnected audiences in the last 7 days. Q2. Write a query to compute the average number of reactions per post coming from friends and from unconnected viewers in the last 7 days. ##### Hints Leverage info_stream_views for watch-time filtering and join to post_reactions for reaction counts; window of CURRENT_DATE-6 to CURRENT_DATE.

Quick Answer: This question evaluates SQL-based data manipulation skills including joins, aggregation, temporal filtering, and audience segmentation to calculate viewing-time and reaction metrics.

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
  • 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 ad impression conversion rates - Meta (medium)
  • Count unconnected posts and reactions - Meta (medium)
  • Count heavy callers in 7 days - Meta (medium)
  • Write SQL for call metrics - Meta (medium)
  • Write SQL for multi-account metrics - Meta (medium)