PracHub
QuestionsLearningGuidesInterview Prep

Quick Overview

This question evaluates a data scientist's competency in time-series data manipulation and metric validation, focusing on calculating Year-over-Year advertising revenue with SQL/Python and window functions while recognizing pitfalls associated with rolling sums.

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

Improve YoY Revenue Analysis with Complementary Metrics

Company: Meta

Role: Data Scientist

Category: Data Manipulation (SQL/Python)

Difficulty: medium

Interview Round: Onsite

ads_revenue +------------+-----------+ | date | revenue | +------------+-----------+ | 2023-01-01 | 120000 | | 2023-02-01 | 125500 | | 2024-01-01 | 140000 | | 2024-02-01 | 145000 | | 2024-03-01 | 150000 | +------------+-----------+ ##### Scenario Analyzing advertising revenue performance ##### Question Write SQL to calculate Year-over-Year (YoY) ads revenue by month. What potential pitfalls exist when using a rolling sum in this context? Suggest ways to improve or complement the YoY growth-rate metric. ##### Hints Think window functions, seasonality, data sparsity, normalization.

Quick Answer: This question evaluates a data scientist's competency in time-series data manipulation and metric validation, focusing on calculating Year-over-Year advertising revenue with SQL/Python and window functions while recognizing pitfalls associated with rolling sums.

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)