PracHub
QuestionsPremiumLearningGuidesInterview PrepNEWCoaches

Quick Overview

This question evaluates proficiency in data manipulation and aggregation for computing event-based metrics, testing competency in SQL/Python data processing within the Data Manipulation (SQL/Python) domain.

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

Calculate Daily Harmful Content View Percentage

Company: Meta

Role: Data Scientist

Category: Data Manipulation (SQL/Python)

Difficulty: Medium

Interview Round: Technical Screen

VIDEOS +----+-------------+------------+ | id | uploader_id | is_harmful | +----+-------------+------------+ | 1 | 101 | true | | 2 | 102 | false | | 3 | 101 | true | +----+-------------+------------+ ​ VIEWS +----------+---------+---------------------+ | video_id | user_id | view_time | +----------+---------+---------------------+ | 1 | 1001 | 2023-07-01 10:00:00 | | 2 | 1002 | 2023-07-01 10:01:00 | | 1 | 1003 | 2023-07-01 10:02:00 | +----------+---------+---------------------+ ##### Scenario A video-sharing platform wants to quantify how often users watch harmful content. ##### Question Using the provided tables, write a SQL query that returns daily view_prevalence – the percentage of all views in a day that were on videos flagged as harmful. ##### Hints Join videos to views; use SUM(CASE…) / COUNT(*) grouped by DATE(view_time).

Quick Answer: This question evaluates proficiency in data manipulation and aggregation for computing event-based metrics, testing competency in SQL/Python data processing within the Data Manipulation (SQL/Python) domain.

Last updated: Mar 29, 2026

Loading coding console...

PracHub

Master your tech interviews with 7,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)