PracHub
QuestionsPremiumLearningGuidesInterview PrepNEWCoaches

Quick Overview

This question evaluates SQL data-manipulation and analytical competencies, including filtered joins, conditional aggregation, date-window filtering, and business-metric design to measure promotional performance on mobile orders.

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

Analyze Mobile Promo Orders with SQL Query and Metrics

Company: Meta

Role: Data Scientist

Category: Data Manipulation (SQL/Python)

Difficulty: Medium

Interview Round: Technical Screen

orders +-----------+---------+--------------+------------+-----------+----------+ | order_id | user_id | order_amount | order_date | is_mobile | is_promo | +-----------+---------+--------------+------------+-----------+----------+ | 1 | 101 | 55.30 | 2023-08-01 | true | false | | 2 | 102 | 20.00 | 2023-08-02 | false | true | | 3 | 101 | 80.00 | 2023-08-05 | true | true | +-----------+---------+--------------+------------+-----------+----------+ ​ users +---------+---------+--------------+--------+ | user_id | country | sign_up_date | gender | +---------+---------+--------------+--------+ | 101 | US | 2023-06-10 | F | | 102 | CA | 2023-07-04 | M | | 103 | US | 2023-05-12 | F | +---------+---------+--------------+--------+ ##### Scenario Meta e-commerce storefront wants to understand recent promotional performance on mobile orders. ##### Question Using the orders table, write a SQL query that returns the proportion of orders that satisfy ALL of these conditions: placed via mobile, order_amount > 50, order_date within the last 30 days, used a promo, and made by a US customer. 2. Join the result with the users table and create at least two additional business-relevant metrics of your choice (e.g., promo-order share by gender, average order value by country). Provide SQL and briefly justify each metric. ##### Hints Use CTEs, conditional aggregation, and clearly separate numerator vs. denominator; justify metric selection in one sentence each.

Quick Answer: This question evaluates SQL data-manipulation and analytical competencies, including filtered joins, conditional aggregation, date-window filtering, and business-metric design to measure promotional performance on mobile orders.

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)