← Meta Interview Insights

Meta·Data Analyst·Technical Phone Screen·Intermediate

Intermediate
Apr 2026

Summary

Interviewed at Meta for what seems like a data or analytics role. The content is pretty sparse so there's not much to go on, but the question about sales by customer city points to some kind of SQL or product analytics exercise.

Questions Asked (1)

Q1

Write a query to show total sales broken down by customer city.

Product Analytics & MetricsData Modeling
Author's notes

Pretty standard aggregation question.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the data model: identify the sales fact table and the customer dimension table with city information. Then write a SQL query that joins these tables, groups by city, and sums the sales amount, ensuring you handle any necessary filters or date ranges.

Pro tip: Mention that you would validate the results by checking for null cities and ensuring the total sales match the overall sum, as data quality issues can skew city-level breakdowns.

1. Clarify requirements and data model

Ask about the time period, definition of 'sales' (e.g., revenue, units), and whether to include all cities or only those with sales. Confirm the table structures and join keys.

2. Identify tables and join keys

Determine the sales fact table (e.g., orders, transactions) and the customer dimension table containing city. Identify the common key, typically customer_id.

3. Write the SQL query

Construct a query that joins the tables, groups by city, and sums the sales amount. Use appropriate aggregation functions and aliases.

4. Handle edge cases and filters

Consider filtering by date range if needed, handling NULL cities, and deciding whether to include cities with zero sales. Use LEFT JOIN if you want all cities.

5. Validate and optimize

Check that the total sales across cities matches the overall total. Discuss indexing or partitioning for performance if the dataset is large.

Key Points to Mention

  • Use of JOIN between sales and customer tables
  • GROUP BY city with SUM(sales_amount)
  • Handling NULL or unknown cities (e.g., COALESCE or filtering)
  • Filtering by date range if applicable
  • Validation of results (e.g., total sales match)
  • Performance considerations (indexes, partitioning)

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.