Practice Free
← Syllabus|
Easy

13. Flagged High-Value Cross-Border Wire Transfers

EasyFundamentalsPostgreSQL 16PRO
Table: wire_transfers
+-------------------+-------------+
| Column Name       | Type        |
+-------------------+-------------+
| transfer_id       | varchar(16) |
| sender_account_id | int         |
| recipient_country | varchar(4)  |
| amount_usd        | numeric(12  |
| compliance_status | varchar(30) |
+-------------------+-------------+

transfer_id is the unique key for this table. Each row contains record details for this enterprise dataset.

Anti-Money Laundering (AML) compliance mandates that all international wire transfers equal to or exceeding $10,000 destined for monitored jurisdictions or flagged with a status of 'pending_review' must be escalated for officer sign-off.

Write a query to retrieve all cross-border wire transfers from `wire_transfers` where: - `amount_usd >= 10000.00` - `compliance_status = 'pending_review'` Return: 1. `transfer_id` 2. `sender_account_id` 3. `recipient_country` 4. `amount_usd` Order the results by `amount_usd` descending, then by `transfer_id` ascending.

Return the result table ordered as specified. The result format is in the following example.

Example 1:
Input:
Preparing sample rows...
Output:
Calculating benchmark target...
Explanation:

High-value wire transfers pending compliance review sorted by amount descending.

Constraints:
  • Query must utilize clause(s): WHEREANDORDER BY
  • Result order matters (tie-breakers and sort order must be strictly preserved).
  • Engine: PostgreSQL 16 standard syntax (in-browser WASM).
query.sql|PostgreSQL 16 WASM
Loading SQL editor...
You must run your code first

Write your SQL query in the editor and click Run or Submit to test against in-browser PostgreSQL 16 WASM.

About the “Flagged High-Value Cross-Border Wire Transfers” SQL Problem

Business Scenario

Anti-Money Laundering (AML) compliance mandates that all international wire transfers equal to or exceeding $10,000 destined for monitored jurisdictions or flagged with a status of 'pending_review' must be escalated for officer sign-off.

Expected Output & Criteria

High-value wire transfers pending compliance review sorted by amount descending.

Database Table Schema (PostgreSQL DDL)

PostgreSQL 16 WASM
CREATE TABLE wire_transfers (
        transfer_id VARCHAR(16) PRIMARY KEY,
        sender_account_id INT NOT NULL,
        recipient_country VARCHAR(4) NOT NULL,
        amount_usd NUMERIC(12, 2) NOT NULL,
        compliance_status VARCHAR(30) NOT NULL
      );

Target SQL Clauses & Operators

WHEREANDORDER BY

Want more Fundamentals practice?

Explore the full syllabus of 16 exercises and syntax guides.

View Fundamentals Track