PracHub
QuestionsPremiumCoachesLearningGuidesInterview Prep

Quick Overview

This question evaluates a candidate's competence in SQL data manipulation and analytical metrics, including aggregating boolean fields, computing daily and average visibility rates, and applying date-based filters and conditional logic.

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

Identify Shops with Low Weekly Visibility Rates

Company: Meta

Role: Data Scientist

Category: Data Manipulation (SQL/Python)

Difficulty: Medium

Interview Round: Onsite

SHOP_VISIBILITY +-----------+---------+------------+---------+ | shop_id | user_id | view_date | visible | +-----------+---------+------------+---------+ | 101 | 555 | 2023-07-01 | true | | 102 | 556 | 2023-07-01 | false | | 101 | 557 | 2023-07-02 | true | | 103 | 560 | 2023-07-02 | true | | 102 | 561 | 2023-07-03 | false | +-----------+---------+------------+---------+ ##### Scenario Marketplace team wants to measure how visible each shop is to users over time. ##### Question Write an SQL query that calculates each shop’s daily visibility rate (percentage of records where visible = true). Identify shops whose average visibility rate is below 50% during the past 7 days. ##### Hints Use CASE expressions, GROUP BY, HAVING, and date filters.

Quick Answer: This question evaluates a candidate's competence in SQL data manipulation and analytical metrics, including aggregating boolean fields, computing daily and average visibility rates, and applying date-based filters and conditional logic.

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)