All practice tasks

SQL Case

Net settled amount by merchant

Subtract refunds from succeeded payment value for each merchant.

Schema

sql
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);

What this task practices

Net settled amount by merchant is a sql case interview exercise that trains prompt interpretation, explicit assumptions, a concrete response, and a clear explanation of tradeoffs. The catalog marks it as easy difficulty. It focuses on Data Reasoning, Validation, Technical Reasoning. The signed-in workspace provides the tools for the round and evaluates the attempt against task-specific criteria. Reference solutions, hidden checks, evaluator instructions, and candidate work remain private.

Sign in to startThe workspace and evaluation open after sign in.