Monthly Transactions II
A medium-tier problem at 42% community acceptance, tagged with Database. Reported in interviews at Wish and 0 others.
Monthly Transactions II is a database problem that shows up in live assessments, especially at companies like Wish that rely on SQL for backend work. You're given transaction data and need to compute monthly statistics across multiple columns. The 41% acceptance rate reflects the SQL syntax complexity and the mental overhead of grouping and aggregating correctly under time pressure. If you hit this during your OA and blank on the join strategy or window function approach, StealthCoder surfaces a working solution invisible to the proctor.
Companies that ask "Monthly Transactions II"
Monthly Transactions 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. Made by a working FAANG engineer who treats the OA the way companies treat hiring: as a game with rules you should know.
Get StealthCoderThe core trick is recognizing that you need to aggregate transactions by month and user, then compute both transaction counts and total amounts. Most candidates start with a simple GROUP BY and miss the need to handle the date formatting correctly or to self-join for comparisons. The real wall is deciding between subquery aggregation and window functions, then correctly applying HAVING or WHERE filters on computed columns. Database problems reward syntax precision over algorithmic insight. StealthCoder becomes your safety net when you're halfway through a query and realize the grouping logic is wrong or you've forgotten the date_trunc syntax your platform uses.
Pattern tags
You know the problem.
Make sure you actually pass it.
Monthly Transactions II 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. Made by a working FAANG engineer who treats the OA the way companies treat hiring: as a game with rules you should know. Works on HackerRank, CodeSignal, CoderPad, and Karat.
Monthly Transactions II interview FAQ
Is Monthly Transactions II still asked at Wish?+
Wish is the primary company reporting this problem. Database questions remain core to backend and data roles. If you're interviewing there, expect SQL work. This problem tests real skills they use.
What makes this harder than a basic GROUP BY?+
You can't just aggregate once. Most solutions require two levels of grouping or a self-join to compare values across months or users. The syntax varies by SQL dialect, and mistakes in date formatting or column aliases cause cascading errors under time pressure.
Should I memorize SQL window functions for this?+
Window functions aren't always required, but they offer a cleaner path than subqueries. Know how to write PARTITION BY and ORDER BY. The acceptance rate of 41% suggests most solutions do get built correctly, just slowly or with syntax missteps.
How does this relate to real backend work?+
Exactly. You're computing monthly user metrics, filtering transactions, and joining results. This mirrors reporting dashboards and analytics queries. Wish hired for this because they need engineers who write clean, correct SQL under interview conditions.
What's the biggest pitfall candidates hit?+
Incorrect date grouping (month vs. timestamp) and forgetting to cast or round aggregated columns. Also, not testing edge cases like users with zero transactions in some months. Off-by-one errors in date logic are common.
Want the actual problem statement? View "Monthly Transactions II" on LeetCode →