PracHub
QuestionsPremiumCoachesLearningGuidesInterview Prep

Quick Overview

This question evaluates a data scientist's skill in data manipulation, time-series aggregation, cohort analysis, and metric design using SQL or Python to quantify shop visibility via page view counts.

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

Analyze New Shops' Activity Compared to Existing Ones

Company: Meta

Role: Data Scientist

Category: Data Manipulation (SQL/Python)

Difficulty: Medium

Interview Round: Onsite

shops +---------+------------+---------------+ | shop_id | created_at | category | +---------+------------+---------------+ | 1 | 2024-01-03 | fashion | | 2 | 2023-11-20 | home | | 3 | 2024-02-10 | electronics | | 4 | 2023-09-15 | fashion | | 5 | 2024-03-01 | toys | +---------+------------+---------------+ ​ page_views +----------+---------+---------------------+ | shop_id | user_id | viewed_at | +----------+---------+---------------------+ | 1 | 501 | 2024-03-10 09:01:15 | | 2 | 877 | 2024-03-10 09:05:11 | | 1 | 612 | 2024-03-10 09:06:55 | | 3 | 501 | 2024-03-10 09:07:15 | | 4 | 933 | 2024-03-10 09:09:05 | +----------+---------+---------------------+ ##### Scenario Marketplace wants to understand whether newly onboarded shops are more active and visible than existing ones. ##### Question Given the tables below, write SQL to compute daily shop visibility (number of page_views per shop). Then propose and calculate a metric that demonstrates whether shops created in the last 30 days are more active than older shops. ##### Hints Join page_views with shops, group by shop_id and date, compare average views of new-shop cohort (<30 days) versus older cohort; consider median to limit outlier impact.

Quick Answer: This question evaluates a data scientist's skill in data manipulation, time-series aggregation, cohort analysis, and metric design using SQL or Python to quantify shop visibility via page view counts.

Last updated: Mar 29, 2026

Loading coding console...

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.

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)