Audit ambiguous dates and mixed currencies
Original fictional practice data · 2026-11-11 · CC BY 4.0

BRIEF
A travel-expense import mixes date conventions and currency labels. Produce an accepted ledger from the declared source convention, leaving ambiguous and unsupported records for review.

CONTRACT
1. The supplied dates are valid calendar dates. DMY means day/month/year; MDY means month/day/year; ISO means YYYY-MM-DD. UNKNOWN must be held.
2. amount_minor represents hundredths for the USD and EUR rows. The training rate is exactly EUR 1 = USD 1.10; it is fictional, not a market quote.
3. Accept only declared dates and currencies in rates. Output expense_id,iso_date,usd_cents sorted by expense_id; retain zero expense E05.

METHOD
Interpret E01 as 11 April and E02 as 4 November from their separate metadata.
Hold E03 for a date convention and E06 for a missing currency policy.
Join the declared rate and calculate integer cents. Keep rate assumptions beside the delivered file.

COMMON MISTAKE
A computer locale guesses a date convention. A currency symbol or an unlabeled number does not establish an exchange rate.

INDEPENDENT CROSS-CHECK
Accepted four rows total 28,200 USD cents. E03 and E06 are held, not silently converted.

DELIVER
A checked output CSV and a handoff note explaining the exception policy. Use setup.sql in SQLite or import each table CSV into your spreadsheet. expected.csv is the complete reference result; an empty CSV field represents SQL NULL. The browser executes SQLite, not Excel formulas. XLOOKUP is unavailable in Excel 2016 and 2019.

Sources for function behavior: https://www.sqlite.org/lang_select.html and https://support.microsoft.com/en-us/excel/functions/xlookup-function (checked 2026-11-11). Rates, dates and policies here are exercise assumptions.
