PracHub
QuestionsPremiumLearningGuidesCheatsheetNEWCoaches

Quick Overview

This question evaluates proficiency in SQL data manipulation and data engineering competencies, focusing on merging per-day and cumulative metrics, join semantics, and null-value handling in the Data Manipulation (SQL/Python) domain.

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

Compute cumulative metrics with full joins

Company: Meta

Role: Data Engineer

Category: Data Manipulation (SQL/Python)

Difficulty: Medium

Interview Round: Onsite

Tables: - daily_metrics(date DATE, content_id STRING, daily_value BIGINT) - cumulative_metrics(date DATE, content_id STRING, cumulative_value BIGINT) — contains yesterday’s cumulative only (date = D - INTERVAL '1' DAY) Task: For a target date D, write SQL that produces today’s cumulative per content_id as COALESCE(y.cumulative_value, 0) + COALESCE(d.daily_value, 0) for every content_id that appears in either table. Use a FULL OUTER JOIN on content_id between daily_metrics filtered to date = D (alias d) and cumulative_metrics filtered to date = D - 1 (alias y). Return (date = D, content_id, cumulative_value).

Quick Answer: This question evaluates proficiency in SQL data manipulation and data engineering competencies, focusing on merging per-day and cumulative metrics, join semantics, and null-value handling in 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)