PracHub
QuestionsPremiumLearningGuidesCheatsheetNEWCoaches

Quick Overview

This question evaluates proficiency in SQL data aggregation and time-based event summarization, focusing on counting and grouping user-generated records to measure recent activity.

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

Identify Top Contributors by Recent Post Count

Company: LinkedIn

Role: Data Scientist

Category: Data Manipulation (SQL/Python)

Difficulty: Medium

Interview Round: Technical Screen

posts +----+---------+---------------------+ | id | user_id | created_at | +----+---------+---------------------+ | 1 | 101 | 2023-09-01 10:00:00 | | 2 | 102 | 2023-09-01 11:00:00 | | 3 | 101 | 2023-09-02 09:30:00 | | 4 | 103 | 2023-09-02 12:45:00 | | 5 | 101 | 2023-09-03 14:20:00 | +----+---------+---------------------+ ##### Scenario A social media platform wants to list how many posts each user created in the last 30 days to spot top contributors. ##### Question Given table posts(id, user_id, created_at), write a SQL query that returns user_id and post_count for the past 30 days, ordered by post_count DESC. ##### Hints Filter by created_at >= current_date - interval '30 days', GROUP BY user_id, ORDER BY count desc.

Quick Answer: This question evaluates proficiency in SQL data aggregation and time-based event summarization, focusing on counting and grouping user-generated records to measure recent activity.

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

  • Write SQL for rankings, state, and aggregations - LinkedIn (easy)
  • Analyze member video posting behavior by country - LinkedIn (easy)
  • Compute article-type diversity per user and histogram - LinkedIn (easy)
  • Compute each member’s current notification status - LinkedIn (easy)
  • Find top countries by population per continent - LinkedIn (easy)