Restaurant Growth
A medium-tier problem at 57% community acceptance, tagged with Database. Reported in interviews at Point72 and 0 others.
You're looking at a database problem that Point72 has asked. Restaurant Growth sits at medium difficulty with a 57% acceptance rate, which means half the people who see it walk out of the assessment without a clean solution. The trap here is that most candidates approach it like a standard SQL query when the real challenge is understanding how to detect and measure state changes across temporal data. If this problem hits your live OA and you blank on the sequencing logic, StealthCoder surfaces the working query in seconds, invisible to the proctor.
Companies that ask "Restaurant Growth"
Restaurant Growth 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 used it to pass JPMorgan's OA and system design loop.
Get StealthCoderThe core pattern is gap-and-island detection or change-point analysis over ordered rows. You need to identify periods where a condition holds true, isolate each distinct group, then aggregate or rank within those groups. The naive approach is to write a self-join or a subquery that compares every row to every other row, which tanks on large datasets. The efficient move is a window function that assigns a group ID based on when the ordering metric or state changes, then groups by that ID. This is where most candidates derail: they don't recognize the need for a running counter or partition boundary, so their query either runs forever or returns wrong answers. StealthCoder handles the window function sequencing and group-assignment logic so you don't have to improvise it under live pressure.
Pattern tags
You know the problem.
Make sure you actually pass it.
Restaurant Growth 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 used it to pass JPMorgan's OA and system design loop. Works on HackerRank, CodeSignal, CoderPad, and Karat.
Restaurant Growth interview FAQ
How hard is Restaurant Growth really?+
Medium difficulty with 57% pass rate, so it's a true filter. It's not just complex SQL syntax; it's pattern recognition. You need to spot that this is a gap-and-island or temporal grouping problem, not a simple aggregate. If you've seen that pattern before, it's a fast solve. If not, you'll hit a wall.
What's the trick I'm missing?+
Window functions are the backbone. Most candidates don't use them, so they end up writing inefficient joins. You need to assign a group ID based on a change in state or order, then aggregate within each group. That's the pattern that makes it click.
Is this still being asked at places like Point72?+
Yes, Point72 is on the record for this one. It's a database role staple. If you're interviewing for any data or analytics engineering position, temporal analysis and window functions are fair game.
How does Restaurant Growth relate to other database problems?+
It combines ordering, windowing, and aggregation. If you can solve this, you understand how to track state changes over time, which comes up in churn analysis, user journey mapping, and any retention metric. It's a foundation skill.
What's the most common mistake?+
Not using window functions and instead writing a Cartesian join or nested subquery that compares every row to every other. That approach works on toy data but times out in the real OA. The solution is recognizing the group-by-change pattern early.
Want the actual problem statement? View "Restaurant Growth" on LeetCode →