PracHub
QuestionsPremiumLearningGuidesInterview PrepNEWCoaches

Quick Overview

This question evaluates a candidate's competency in data manipulation and deduplication, focusing on aggregation and handling of temporal attributes to identify repeated entries by the same user.

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

Identify Duplicate Posts by User and Date

Company: Meta

Role: Data Scientist

Category: Data Manipulation (SQL/Python)

Difficulty: Medium

Interview Round: Onsite

posts +---------+---------+---------------------+---------------+ | post_id | user_id | created_at | content | +---------+---------+---------------------+---------------+ | 101 | 1 | 2024-05-01 10:00:00 | hello world | | 102 | 1 | 2024-05-01 10:00:00 | hello world | | 103 | 2 | 2024-05-02 12:00:00 | good morning | | 104 | 1 | 2024-05-03 09:00:00 | hello world | | 105 | 2 | 2024-05-02 12:05:00 | good morning | +---------+---------+---------------------+---------------+ ##### Scenario Meta wants to detect duplicate posts so they can surface only unique content in users’ feeds. ##### Question Given table posts(post_id, user_id, created_at, content), write SQL that returns user_id, content, duplicate_count for posts where the same user posted identical content on the same calendar day (duplicate_count ≥ 2). ##### Hints Group by user_id, content, DATE(created_at); HAVING COUNT(*) > 1.

Quick Answer: This question evaluates a candidate's competency in data manipulation and deduplication, focusing on aggregation and handling of temporal attributes to identify repeated entries by the same user.

Last updated: Mar 29, 2026

Loading coding console...

PracHub

Master your tech interviews with 7,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)