0
← Exercises/
Joins•6 of 12
JoinsIntermediatePRO

Cross-Border Wire Transfers with Beneficiary KYC Level

Scenario

Compliance auditors must verify that international wire transfers exceeding $15,000 USD only flow to accounts with Verified KYC status ('Tier_3_Enhanced'). Unverified accounts receiving large transfers represent severe compliance violations.

Task
Join `cross_border_transfers` with `bank_accounts` on `beneficiary_acc_id = account_id`. Return: 1. `t.transfer_id` 2. `t.amount_usd` 3. `a.account_number` 4. `a.account_holder` 5. `a.kyc_status` Filter for: - `t.amount_usd >= 15000.00` - `a.kyc_status != 'Tier_3_Enhanced'` Order results by `t.amount_usd` descending.
Expected Output Format

Compliance violation list of high-value wires sent to unverified accounts.

Input Tables & Sample Data0 tables
Loading database schema...
Need a hint?
query.sql|Local Sandbox
Loading SQL editor...
Click "Run" or press ⌘ + Enter to execute your query

About the “Cross-Border Wire Transfers with Beneficiary KYC Level” SQL Problem

Business Scenario

Compliance auditors must verify that international wire transfers exceeding $15,000 USD only flow to accounts with Verified KYC status ('Tier_3_Enhanced'). Unverified accounts receiving large transfers represent severe compliance violations.

Expected Output & Criteria

Compliance violation list of high-value wires sent to unverified accounts.

Database Table Schema (PostgreSQL DDL)

PostgreSQL 16 WASM

This challenge executes directly against the following relational schema in your browser:

CREATE TABLE bank_accounts (
        account_id INT PRIMARY KEY,
        account_number VARCHAR(30) NOT NULL,
        account_holder VARCHAR(100) NOT NULL,
        kyc_status VARCHAR(30) NOT NULL
      );

      CREATE TABLE cross_border_transfers (
        transfer_id VARCHAR(16) PRIMARY KEY,
        beneficiary_acc_id INT REFERENCES bank_accounts(account_id),
        amount_usd NUMERIC(12, 2) NOT NULL,
        created_at TIMESTAMP NOT NULL
      );

Target SQL Clauses & Operators

JOINWHEREORDER BY

Want more Joins practice?

Explore the full syllabus of 12 exercises, syntax guides, and interview pitfalls.

View Joins Track→