PracHub
QuestionsPremiumLearningGuidesCheatsheetNEWCoaches

Quick Overview

This question evaluates a data scientist's proficiency in SQL-based data manipulation, including joins, distinct counting and grouping, aggregations, string concatenation for user identity, and NULL handling across event and review tables.

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

Analyze User Flags and Review Outcomes for Moderation Prioritization

Company: Google

Role: Data Scientist

Category: Data Manipulation (SQL/Python)

Difficulty: Medium

Interview Round: Technical Screen

UserFlags +---------------+--------------+----------+---------+ | User_FirstName| User_LastName| Video_ID | Flag_ID | +---------------+--------------+----------+---------+ | Alice | Zhang | v1 | f101 | | Bob | Singh | v1 | f102 | | Alice | Zhang | v2 | f103 | | Carol | Lee | v3 | f104 | | Bob | Singh | v3 | f105 | +---------------+--------------+----------+---------+ ​ FlagReviews +----------+---------+--------------+-----------------+ | Video_ID | Flag_ID | Reviewed_date| Reviewed_outcome| +----------+---------+--------------+-----------------+ | v1 | f101 | 2023-01-02 | APPROVED | | v1 | f102 | 2023-01-03 | REJECTED | | v2 | f103 | 2023-01-05 | APPROVED | | v3 | f104 | 2023-01-04 | APPROVED | | v3 | f105 | NULL | NULL | +----------+---------+--------------+-----------------+ ##### Scenario YouTube Trust & Safety team wants to analyze user-generated video flags and their review outcomes to prioritize moderation resources. ##### Question Q1. Given table UserFlags(User_FirstName, User_LastName, Video_ID, Flag_ID), write a SQL query that returns, for every Video_ID, the number of flags submitted by distinct users. Q2. Using UserFlags and FlagReviews(Video_ID, Flag_ID, Reviewed_date, Reviewed_outcome), find the count of flags reviewed by YouTube for the single video that received the highest total number of user flags. Q3. Combining both tables, determine which user (concatenate first and last name) flagged the greatest number of videos that were ultimately APPROVED by YouTube. Q4. Write a query that lists every row from any provided table where at least one column contains NULL. ##### Hints Think joins, distinct counts, grouping, and IS NULL filters. For Q3, count unique Video_IDs per user where Reviewed_outcome = 'APPROVED'.

Quick Answer: This question evaluates a data scientist's proficiency in SQL-based data manipulation, including joins, distinct counting and grouping, aggregations, string concatenation for user identity, and NULL handling across event and review tables.

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

  • Generate binomial matrix and column-normalize - Google (Medium)
  • Analyze video flags and reviews with SQL - Google (Medium)
  • Write SQL/Python for messy event data - Google (Medium)
  • Add a conditional column in Python - Google (Medium)
  • Find most co‑purchased product pairs in SQL - Google (Medium)