PracHub
QuestionsPremiumLearningGuidesInterview PrepNEWCoaches

Quick Overview

This question evaluates proficiency in SQL-based data aggregation and ranking techniques applied to event logs, testing skills such as grouping, counting, and the use of window/ranking functions to identify top users by date.

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

Identify Top Three Active Users by Event Date

Company: Meta

Role: Data Scientist

Category: Data Manipulation (SQL/Python)

Difficulty: Medium

Interview Round: Onsite

event_log +------------+---------+-----------+---------------------+ | event_date | user_id | event_type| event_timestamp | +------------+---------+-----------+---------------------+ | 2025-06-01 | 123 | click | 2025-06-01 10:15:00 | | 2025-06-01 | 123 | view | 2025-06-01 10:16:00 | | 2025-06-01 | 456 | click | 2025-06-01 11:00:00 | | 2025-06-02 | 123 | click | 2025-06-02 09:00:00 | | 2025-06-02 | 789 | view | 2025-06-02 12:30:00 | +------------+---------+-----------+---------------------+ ##### Scenario Meta onsite interview for a Data Engineer/Data Scientist role; interviewer wants to test SQL depth on product event logs. ##### Question Given the event_log table, write a SQL query that returns the three most active users (by event count) for every event_date, ordered by activity. ##### Hints Aggregate counts, apply ROW_NUMBER() over each date partition, then filter where row_number <= 3.

Quick Answer: This question evaluates proficiency in SQL-based data aggregation and ranking techniques applied to event logs, testing skills such as grouping, counting, and the use of window/ranking functions to identify top users by date.

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)