The Consecutive Transactions with Increasing Amounts interview question is a high-level database problem that asks you to identify specific trends in financial data. You are given a Transactions table containing customer IDs, transaction dates, and amounts. Your task is to find all customers who made at least three consecutive transactions on consecutive days where each transaction's amount was strictly greater than the previous one.
Amazon and other fintech-oriented companies use the Consecutive Transactions with Increasing Amounts coding problem to assess a candidate's ability to handle multi-layered logical constraints in SQL. It tests your mastery of grouping, ordering, and advanced analytical functions. This type of query is essential for identifying patterns such as credit card fraud, tiered reward eligibility, or consumer behavior shifts.
This follows the Database interview pattern, specifically focusing on "Gaps and Islands" logic combined with sequence analysis. You typically solve this by:
Imagine a user's activity:
The logic must recognize that the first three days form a valid "island" of increasing transactions.
Practice "Gaps and Islands" problems. Understanding how to use ROW_NUMBER() or LAG() to identify contiguous blocks of data is a differentiator for senior-level SQL roles.