About the “Merchant Processing Volume & Chargeback Ratio” SQL Problem
Business Scenario
Card network regulations (Visa/Mastercard) place merchants with elevated dispute rates on monitoring programs. The risk engineering team needs to aggregate transaction volumes and identify merchants with a dispute rate exceeding 1.0%.
Expected Output & Criteria
High-risk merchants with dispute rate >= 1.0%, sorted by highest dispute rate.
Database Table Schema (PostgreSQL DDL)
PostgreSQL 16 WASMThis challenge executes directly against the following relational schema in your browser:
CREATE TABLE merchant_transactions (
txn_id VARCHAR(16) PRIMARY KEY,
merchant_id INT NOT NULL,
merchant_name VARCHAR(100) NOT NULL,
amount_usd NUMERIC(10, 2) NOT NULL,
is_disputed INT NOT NULL DEFAULT 0
);Target SQL Clauses & Operators
Want more Aggregations practice?
Explore the full syllabus of 12 exercises, syntax guides, and interview pitfalls.