MEDIUMasked at 1 company

Active Users

A medium-tier problem at 37% community acceptance, tagged with Database. Reported in interviews at ciena and 0 others.

Founder's read

Active Users is a medium-difficulty database problem with a 36% acceptance rate, asked by Ciena. It's the kind of problem that seems straightforward until you realize you're either over-complicating the join logic or missing a crucial filter condition. The gap between a naive query and the correct one often comes down to understanding how to properly aggregate user activity data across a time window. If this hits your live assessment and you blank on the exact syntax or logic flow, StealthCoder surfaces a working solution in seconds, invisible to the proctor.

Companies asking
1
Difficulty
MEDIUM
Acceptance
37%

Companies that ask "Active Users"

If this hits your live OA

Active Users 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 an Amazon engineer who realized the OA tests how well you memorized 200 problems, not how well you code.

Get StealthCoder
What this means

This problem lives in the database topic and typically requires you to identify users who meet a specific activity threshold within a given time range. The trap is writing a query that either counts all records instead of distinct users, joins tables incorrectly, or doesn't properly filter on the date condition. Most candidates start with a simple GROUP BY and COUNT, then realize they need a WHERE clause to exclude inactive users or a subquery to handle the time window. The pattern: select the right columns, filter the data correctly, aggregate with the right function, and group by the user identifier. When you're stuck on whether to use HAVING or WHERE, or how to structure the join, StealthCoder delivers the exact query structure in real time.

Pattern tags

The honest play

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

Active Users recycles across companies for a reason. It's medium-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 an Amazon engineer who realized the OA tests how well you memorized 200 problems, not how well you code. Works on HackerRank, CodeSignal, CoderPad, and Karat.

Active Users interview FAQ

Is Active Users still asked at Ciena?+

Yes. Ciena reports it in their recent assessment cycle. It's a core database problem they use to filter for SQL proficiency. The 36% acceptance rate suggests it's a real filter, not a gimme.

What's the main trick to this problem?+

Correctly identifying active users within the time window and filtering out inactive ones. Most mistakes come from either counting all activity records instead of unique users, or writing a WHERE clause that's too loose or too strict.

Do I need a subquery or can I use HAVING?+

You can do both, but one is cleaner. The key is filtering the date range first, then grouping by user and aggregating. HAVING is typically used to filter aggregates after GROUP BY. Test both approaches mentally before committing.

How does Active Users relate to SQL joins and aggregation?+

It tests both. You need to join tables correctly (users to activity logs), filter on dates, group by user ID, and aggregate counts or sums. It's a classic multi-step problem that catches candidates who skip the planning phase.

Is this problem language-agnostic or SQL-only?+

It's a database problem, so SQL is expected. The assessment platform will provide the schema and data. Focus on writing clean, correct SQL rather than guessing the table structure.

Want the actual problem statement? View "Active Users" 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.