PracHub
QuestionsPremiumLearningGuidesInterview PrepNEWCoaches

Quick Overview

This question evaluates data manipulation and time-series analysis skills, including rolling aggregations and year-over-year percentage calculations using SQL or Python.

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

Forecast Next Year's Revenue Using YoY% Analysis

Company: Meta

Role: Data Scientist

Category: Data Manipulation (SQL/Python)

Difficulty: Medium

Interview Round: Onsite

ad_revenue +------------+---------+ | date | revenue | +------------+---------+ | 2023-01-01 | 1000 | | 2023-01-02 | 1200 | | 2024-01-01 | 1500 | | 2024-01-02 | 1600 | | 2024-01-03 | 1550 | +------------+---------+ ##### Scenario Advertising platform wants to understand and forecast revenue trends. ##### Question Using table ad_revenue(date, revenue) compute the 30-day rolling sum of revenue for every calendar day. For each day, calculate the year-over-year percentage change (YoY%). Based on the latest YoY% figure, project total revenue for the next calendar year. ##### Hints Apply WINDOW functions (SUM OVER, LAG, DATEADD) and extrapolate with YoY growth.

Quick Answer: This question evaluates data manipulation and time-series analysis skills, including rolling aggregations and year-over-year percentage calculations using SQL or Python.

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)