PracHub
QuestionsPremiumCoachesLearningGuidesInterview Prep

Quick Overview

This question evaluates proficiency in SQL data manipulation, focusing on joins, aggregations, and handling currency conversion across relational tables.

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

Calculate Total Revenue in USD Using SQL Query

Company: Meta

Role: Data Scientist

Category: Data Manipulation (SQL/Python)

Difficulty: Medium

Interview Round: Onsite

ads_revenue +---------+------------+---------+----------+ | ad_id | country | revenue | currency | +---------+------------+---------+----------+ | 101 | US | 120.00 | USD | | 102 | DE | 90.00 | EUR | | 103 | JP | 13000 | JPY | | 104 | IN | 7000 | INR | | 105 | FR | 85.00 | EUR | +---------+------------+---------+----------+ exchange_rate +----------+----------+ | currency | usd_rate | +----------+----------+ | USD | 1.00 | | EUR | 1.08 | | JPY | 0.0065 | | INR | 0.012 | +----------+----------+ ##### Scenario An ad-tech team stores revenue generated from ad impressions in various currencies and needs total revenue in USD for daily reporting. ##### Question Write a SQL query that returns the total advertising revenue converted to USD, using the revenue and currency columns in ads_revenue and today’s rates in exchange_rate. ##### Hints Join ads_revenue with exchange_rate, multiply revenue by usd_rate, then SUM.

Quick Answer: This question evaluates proficiency in SQL data manipulation, focusing on joins, aggregations, and handling currency conversion across relational tables.

Last updated: Mar 29, 2026

Loading coding console...

PracHub

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