PracHub
QuestionsPremiumCoachesLearningGuidesInterview Prep
|Home/Data Manipulation (SQL/Python)/Meta

Compute seller counts and vehicle share

Last updated: Mar 29, 2026

Quick Overview

This question evaluates data manipulation and analytical SQL competencies such as joining tables, aggregating and deduplicating interaction counts, applying date-window filters, and computing category-level percentage metrics.

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

Compute seller counts and vehicle share

Company: Meta

Role: Data Scientist

Category: Data Manipulation (SQL/Python)

Difficulty: medium

Interview Round: Technical Screen

You are given two tables: 1. `listing_interactions` - `buyer_id` BIGINT - `seller_id` BIGINT - `event_date` DATE - `product_id` BIGINT - `listing_interactions` INT — number of buyer-seller interactions for that product on that date 2. `dim_all_products` - `product_id` BIGINT - `category` STRING - `snapshot_date` DATE - `create_date` DATE - `country` STRING Assumptions: - Join the tables on `product_id`. - All dates are stored in UTC. - Unless otherwise specified, use all available data. - For Question 1, define a product as having **multiple interactions** if the total `listing_interactions` summed across all rows for the same `(seller_id, product_id)` is greater than 1. - For Question 2, define **newly created listings in the US** as products with `country = 'US'` and `create_date` in the last 7 calendar days, inclusive of `CURRENT_DATE`. - For Question 2, the numerator and denominator should both use `SUM(listing_interactions)`. Write SQL for the following two tasks: 1. How many sellers have **more than 3 distinct products** that each have multiple interactions? - Return one row with column: `seller_count` 2. Among newly created US listings from the last 7 days, what percentage of total listing interactions comes from the `vehicle` category? - Return one row with column: `vehicle_interaction_pct` - Express the result as a percentage from 0 to 100.

Quick Answer: This question evaluates data manipulation and analytical SQL competencies such as joining tables, aggregating and deduplicating interaction counts, applying date-window filters, and computing category-level percentage metrics.

Related Interview 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)
Meta logo
Meta
Jan 5, 2026, 12:00 AM
Data Scientist
Technical Screen
Data Manipulation (SQL/Python)
3
0

You are given two tables:

  1. listing_interactions
    • buyer_id BIGINT
    • seller_id BIGINT
    • event_date DATE
    • product_id BIGINT
    • listing_interactions INT — number of buyer-seller interactions for that product on that date
  2. dim_all_products
    • product_id BIGINT
    • category STRING
    • snapshot_date DATE
    • create_date DATE
    • country STRING

Assumptions:

  • Join the tables on product_id .
  • All dates are stored in UTC.
  • Unless otherwise specified, use all available data.
  • For Question 1, define a product as having multiple interactions if the total listing_interactions summed across all rows for the same (seller_id, product_id) is greater than 1.
  • For Question 2, define newly created listings in the US as products with country = 'US' and create_date in the last 7 calendar days, inclusive of CURRENT_DATE .
  • For Question 2, the numerator and denominator should both use SUM(listing_interactions) .

Write SQL for the following two tasks:

  1. How many sellers have more than 3 distinct products that each have multiple interactions?
    • Return one row with column: seller_count
  2. Among newly created US listings from the last 7 days, what percentage of total listing interactions comes from the vehicle category?
    • Return one row with column: vehicle_interaction_pct
    • Express the result as a percentage from 0 to 100.

Submit Your Answer

Sign in to leave a comment

Loading comments...

Browse More Questions

More Data Manipulation (SQL/Python)•More Meta•More Data Scientist•Meta Data Scientist•Meta Data Manipulation (SQL/Python)•Data Scientist Data Manipulation (SQL/Python)
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.