EASYasked at 1 company

User Activity for the Past 30 Days II

A easy-tier problem at 36% community acceptance, tagged with Database. Reported in interviews at Zoom and 0 others.

Founder's read

Zoom asks this problem, and the acceptance rate is 35.7%, which is oddly low for an EASY database problem. That gap suggests most candidates either freeze on the SQL pattern or misread what 30-day activity actually means. You'll write a query to find users active in the past 30 days, but the twist is how you handle the date range and null cases. If you blank on the window function or date arithmetic during the live assessment, StealthCoder surfaces a working solution in seconds, invisible to the proctor.

Companies asking
1
Difficulty
EASY
Acceptance
36%

Companies that ask "User Activity for the Past 30 Days II"

If this hits your live OA

User Activity for the Past 30 Days II is the kind of problem that decides whether you pass. StealthCoder reads the problem on screen and surfaces a working solution in under 2 seconds. Invisible to screen share. The proctor sees nothing. Built by a senior engineer who knows the OA is theater. This is the script.

Get StealthCoder
What this means

The problem looks simple: query user activity within a rolling 30-day window. The catch is precision. Candidates often write a straightforward WHERE clause on activity dates and miss edge cases like users with no activity, off-by-one errors in the date range, or confusion about whether 30 days means exactly 30 or within the last 30. The database topic here involves date functions, aggregation, and possibly a JOIN to ensure all users are considered. When the obvious query doesn't return the expected result set, you're debugging datetime logic in real time. StealthCoder is the hedge for that wall.

Pattern tags

The honest play

You know the problem. Make sure you actually pass it.

User Activity for the Past 30 Days II recycles across companies for a reason. It's easy-tier, and most candidates blank under the timer. StealthCoder is the hedge: an AI overlay invisible during screen share. It reads the problem and surfaces a working solution in under 2 seconds. Built by a senior engineer who knows the OA is theater. This is the script. Works on HackerRank, CodeSignal, CoderPad, and Karat.

User Activity for the Past 30 Days II interview FAQ

Why is the acceptance rate so low for an EASY problem?+

At 35.7%, it's near medium difficulty. Most people misread the 30-day window definition, get date arithmetic wrong, or forget to include users with zero activity. The gap between labeled difficulty and real acceptance reveals a hidden trick.

What's the core SQL pattern for this problem?+

Write a date filter using DATEDIFF or DATE_SUB to define the 30-day range, then aggregate user activity. The trick is handling the cutoff correctly and ensuring you don't lose users at the boundary. Test your date math first.

Do I need a window function for this?+

Not necessarily, but some solutions use ROW_NUMBER or DENSE_RANK to rank activity by date. Simpler approaches group by user ID and count activity within the window. Depends on what the problem asks you to return.

How does this relate to user analytics at Zoom?+

Zoom needs to track active users for reporting and feature flags. A 30-day metric is a standard SaaS KPI. This problem tests your ability to write that query correctly under interview pressure.

What's the most common mistake?+

Off-by-one errors in the date range. Using > instead of >=, or calculating 30 days as 29. Also forgetting to group by user ID or mixing aggregate and non-aggregate columns. Verify your date logic against a simple test case.

Want the actual problem statement? View "User Activity for the Past 30 Days II" on LeetCode →

Frequency and company-tag data sourced from public community-maintained interview-report repos. Problem, description, and trademark © LeetCode. StealthCoder is not affiliated with LeetCode.