MEDIUMasked at 1 company

Monthly Transactions I

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

Founder's read

You're staring at a Database problem asking you to pivot transaction data into monthly buckets. This one's on Wish's radar, and it sits at 58% acceptance, which means half the candidates in your OA will stumble on the grouping logic or date handling. The trap is thinking it's just a simple GROUP BY. It's not. You need to extract the month, handle edge cases around year boundaries, and format output correctly. If you're not fluent in SQL window functions or date arithmetic, you'll waste 10 minutes on syntax. That's where StealthCoder becomes your insurance: if the date logic blanks you mid-assessment, it surfaces a working solution in seconds while the proctor sees nothing.

Companies asking
1
Difficulty
MEDIUM
Acceptance
58%

Companies that ask "Monthly Transactions I"

If this hits your live OA

Monthly Transactions I 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

Monthly Transactions I requires you to aggregate transaction data by month and reshape it so each row represents a unique user-month combination with a category breakdown. The real work isn't the aggregation itself, it's correctly extracting and grouping by year-month, then conditionally summing amounts per category. Most candidates either miss that you need to pivot categories into separate columns, or they handle date extraction wrong and end up with malformed grouping keys. Some also forget to deal with months that have zero transactions in a category, which breaks the output shape. The SQL itself involves GROUP BY, conditional aggregation (CASE statements), and proper date truncation or formatting. Knowing the exact pattern before you sit down matters a lot here. StealthCoder solves the entire query structure if you hit a wall live.

Pattern tags

The honest play

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

Monthly Transactions I 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 a senior engineer who knows the OA is theater. This is the script. Works on HackerRank, CodeSignal, CoderPad, and Karat.

Monthly Transactions I interview FAQ

Is this problem actually just a GROUP BY, or is there a trick?+

It's not a simple GROUP BY. You need to group by user and month, then pivot categories into columns with conditional sum logic. Date extraction and formatting matter as much as the aggregation itself. Most candidates underestimate the complexity of the reshape.

Do I need to know window functions for this?+

Window functions aren't required for the core solution, but conditional aggregation (CASE WHEN) is essential. Some candidates use window functions to rank or filter, but a clean GROUP BY with CASE statements is usually the intended path.

What happens if a user has no transactions in a specific category for a month?+

You'll likely need to handle NULL values explicitly, either by coalescing to 0 or by ensuring the output includes all category columns even when a sum is empty. The expected output format determines this behavior.

Why is this marked MEDIUM when it feels harder?+

The 58% acceptance rate suggests it's harder in practice than the label implies. Most candidates can write a GROUP BY but miss the output structure or date handling details. If you know SQL pivoting patterns, it drops to easy.

Is this still asked at Wish or similar companies?+

Wish has reported this problem, and the data topic is Database, which remains a core filter at many companies. SQL reshaping and aggregation problems appear frequently in screening rounds and take-homes.

Want the actual problem statement? View "Monthly Transactions I" 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.