Find succeeded payments by the same merchant, customer, and amount within two minutes of the previous match.
Schema
CREATE TABLE merchants (id INTEGER PRIMARY KEY, name TEXT NOT NULL, region TEXT NOT NULL);
CREATE TABLE payments (id INTEGER PRIMARY KEY, merchant_id INTEGER NOT NULL, customer_id INTEGER NOT NULL, amount REAL NOT NULL, method TEXT NOT NULL, status TEXT NOT NULL, created_at TEXT NOT NULL);
CREATE TABLE payment_attempts (id INTEGER PRIMARY KEY, payment_id INTEGER NOT NULL, attempt_no INTEGER NOT NULL, result TEXT NOT NULL, attempted_at TEXT NOT NULL);
CREATE TABLE refunds (id INTEGER PRIMARY KEY, payment_id INTEGER NOT NULL, amount REAL NOT NULL, reason TEXT NOT NULL, created_at TEXT NOT NULL);