Month-over-Month Marketplace GMV Growth by Category
Last updated: November 29, 2026
Quick Overview
Compute monthly gross merchandise value for Facebook Marketplace orders by category and the month-over-month growth rate. Exclude refunded orders and mark the current incomplete month.
Meta
November 29, 20260
0
0 solved
Compute monthly gross merchandise value for Facebook Marketplace orders by category and the month-over-month growth rate. Exclude refunded orders and mark the current incomplete month.
A foundational time series question for analysts supporting Facebook Marketplace and Shops, where a weekly business review tracks GMV by category. The interviewer is looking for clean monthly truncation, LAG within category, and care about partial months.
What the Interviewer Expects
- Filter out refunded or cancelled orders
- Truncate to month and sum GMV
- Use LAG partitioned by category
- Divide safely and as decimals
- Flag or exclude the current partial month
Key Topics to Cover
How to Approach This
- Clarify the schema and expected output format before writing queries.
- Use CTEs (WITH clauses) to break complex queries into readable steps.
- Consider window functions (ROW_NUMBER, RANK, LAG, LEAD) for ranking and sequential analysis.
- Watch for NULLs, duplicates, and edge cases in JOINs and GROUP BY.
- For pandas, prefer vectorized operations over row-by-row iteration.
Possible Follow-up Questions
- How would you compare the partial month fairly to last month?
- Why might a category show growth only because of reclassification?
- How would you show year-over-year instead?
- How would you weight growth across categories for a total?
Sharpen Your Skills on Codemia
Practice similar problems with our interactive workspace, get AI feedback, and track your progress.
Practice SQL ProblemsSample Answer
Clarify the Data
marketplace_orders(order_id, category, order_ts, amount_usd, status). GMV counts orders whose status is not refunded or cancelled. Amounts are already converted to USD. Today is Nov 28, 2026, so...
Approach
Aggregate to (category, month), take LAG of GMV over months within each category, compute growth as current over previous minus one. A category with no orders in a month would skip a row and LAG wou...