Multi-condition WHERE filter against the CTR threshold
FinCEN Form 112 — the Currency Transaction Report — triggers at a $10,000 cash threshold per business day. I need the list of cash deposits over that threshold across the whole table, just to sanity-check that our CTR queue matches what's in the data. Give me `txn_id`, `account_id`, `posted_date`, and `amount`, newest first. Exclude reversals. Cash deposits only — not cash withdrawals.
| Column | Type | Key |
|---|---|---|
| txn_id | INT | PK |
| account_id | INT | FK → aml_accounts |
| posted_date | TEXT | |
| posted_ts | TEXT | |
| amount | REAL | |
| channel | TEXT | |
| counterparty_name | TEXT | |
| counterparty_account_id | INT | |
| is_reversal | INT |
Each hint you reveal reduces the XP you can earn. Try the query first.
The channel you want is `cash_deposit`. `cash_withdrawal` is a different typology (structuring candidates look different there).
Two filters stack in the WHERE clause: `channel = 'cash_deposit'` AND `amount > 10000` AND `is_reversal = 0`. Yes, all three.
Order by posted_date DESC so the most recent CTR-eligible deposit lands at the top of the review queue.