New
ML System Design & SQL tracks just landed
See what's new
×
Question Bank
Pricing
Blog
Forum
HOT
Referral
Description
Solution
Discussion
Submissions
Ask AI
Question Bank
SQL Question
AI Insights
Quick Summary
Compute monthly metrics by analyzing per-customer order frequency.
Distinguish between all active customers and those exceeding a fixed order threshold within each month.
Calculate a rounded percentage ratio while handling potential division-by-zero or sparse data scenarios.
What This Tests
Multi-level aggregation requiring intermediate grouping before final summarization.
Conditional counting and ratio calculations across grouped datasets.
Date extraction and time-period bucketing for chronological analysis.
Graceful handling of edge cases where thresholds are not met or data is sparse.
Common Patterns
Groupby
Aggregation
Date Arithmetic
Collapse
Hint 1
Hint 2
What Interviewers May Ask Next
Accepted
18
/56
Acceptance Rate
32.1%
Ask AI Assistant
Ask AI Assistant
Ask me anything about this coding question!
Qwen
Qwen3.6-Flash
0/2000
Run
Submit
Test Cases
SQL Schema
Pandas Schema
Input
-
Output
-
Expected
-