About the “Cross-Exchange Market Arbitrage Spread” SQL Problem
Business Scenario
Quantitative market makers search for arbitrage discrepancies across crypto exchanges. An arbitrage opportunity exists when Exchange A's highest buy bid is strictly greater than Exchange B's lowest sell ask for the same currency pair.
Expected Output & Criteria
Executable arbitrage pairs where Exchange A bid exceeds Exchange B ask.
Database Table Schema (PostgreSQL DDL)
PostgreSQL 16 WASMThis challenge executes directly against the following relational schema in your browser:
CREATE TABLE exchange_orderbooks (
feed_id INT PRIMARY KEY,
exchange_name VARCHAR(30) NOT NULL,
pair_symbol VARCHAR(20) NOT NULL,
best_bid NUMERIC(10, 2) NOT NULL,
best_ask NUMERIC(10, 2) NOT NULL
);Target SQL Clauses & Operators
Want more Business Analytics practice?
Explore the full syllabus of 14 exercises, syntax guides, and interview pitfalls.