PracHub
QuestionsPremiumLearningGuidesInterview PrepNEWCoaches

Quick Overview

This question evaluates proficiency in SQL data aggregation, time-based grouping, and analytical window functions for computing month-over-month percentage changes in event volumes.

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

Calculate Top Countries' Gmail Usage and MoM Change

Company: Google

Role: Data Scientist

Category: Data Manipulation (SQL/Python)

Difficulty: Medium

Interview Round: Onsite

emails +----+---------+-----------+-----------+------------+ | id | user_id | country | provider | send_date | +----+---------+-----------+-----------+------------+ | 1 | 101 | US | gmail | 2023-06-01 | | 2 | 102 | IN | gmail | 2023-06-02 | | 3 | 103 | US | yahoo | 2023-06-03 | | 4 | 104 | BR | gmail | 2023-07-01 | | 5 | 105 | DE | gmail | 2023-07-02 | +----+---------+-----------+-----------+------------+ ##### Scenario You have an email-send log and need to understand Gmail usage by geography. ##### Question Write a SQL query to calculate the total number of Gmail emails sent per country and return the top five countries by volume. Extend the query to compute the month-over-month (MoM) percentage change in Gmail email volume for each country. ##### Hints Filter provider = 'gmail'; aggregate by country and month; use window functions or self-join for MoM.

Quick Answer: This question evaluates proficiency in SQL data aggregation, time-based grouping, and analytical window functions for computing month-over-month percentage changes in event volumes.

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

  • Generate binomial matrix and column-normalize - Google (Medium)
  • Analyze video flags and reviews with SQL - Google (Medium)
  • Write SQL/Python for messy event data - Google (Medium)
  • Add a conditional column in Python - Google (Medium)
  • Find most co‑purchased product pairs in SQL - Google (Medium)