PracHub
QuestionsPremiumCoachesLearningGuidesInterview Prep

Quick Overview

This question evaluates a candidate's competency in converting multi-currency revenue into USD totals by aligning event dates with FX rates, handling missing rate data, and performing date-based aggregation to produce accurate US and global revenue figures, covering skills in currency conversion, time-aware joins, and data integrity for financial metrics. It is commonly asked to assess accuracy in time-series financial aggregations and proficiency with data manipulation tools and query logic, and is categorized under Data Manipulation (SQL/Python) with a practical application emphasis rather than purely conceptual theory.

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

Convert multi-currency revenue to USD totals

Company: Meta

Role: Data Scientist

Category: Data Manipulation (SQL/Python)

Difficulty: easy

Interview Round: Technical Screen

You are analyzing ad revenue recorded in multiple currencies and need to compute **US revenue** and **global revenue** in **USD**. ### Tables Assume the following schemas: **ad_revenue** - `event_date` DATE - `country` STRING -- ISO country code (e.g., `US`, `CA`) - `currency` STRING -- ISO currency code (e.g., `USD`, `EUR`) - `revenue_amount` NUMERIC -- amount in `currency` **fx_rates** - `rate_date` DATE - `currency` STRING - `usd_per_unit` NUMERIC -- 1 unit of `currency` equals this many USD ### Definitions / assumptions - Convert revenue on `event_date` using the FX rate from the **same date** (`fx_rates.rate_date = ad_revenue.event_date`). - If a rate is missing for a date, use the most recent prior rate (state how you handle this in SQL). - **US revenue** = revenue from rows where `country = 'US'`. - **Global revenue** = revenue from all countries. ### Task Write a SQL query to output daily totals: - `event_date` - `us_revenue_usd` - `global_revenue_usd`

Quick Answer: This question evaluates a candidate's competency in converting multi-currency revenue into USD totals by aligning event dates with FX rates, handling missing rate data, and performing date-based aggregation to produce accurate US and global revenue figures, covering skills in currency conversion, time-aware joins, and data integrity for financial metrics. It is commonly asked to assess accuracy in time-series financial aggregations and proficiency with data manipulation tools and query logic, and is categorized under Data Manipulation (SQL/Python) with a practical application emphasis rather than purely conceptual theory.

Last updated: Mar 29, 2026

Loading coding console...

PracHub

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