Recognises one decimal scale for every currency
DECIMAL(n,2) on an amount column in a table that is not single-currency. ISO 4217's minor-unit table is not a constant 2: JPY has 0, KWD and BHD have 3. Two decimals silently round a dinar instruction and store two meaningless zeros on a yen one.
Can AI do this?
People still lead Few or none of the tested AI models showed they master this. 1 of 10 models master it.
| Model | Tier | Probability of mastery | Status |
|---|---|---|---|
| gemini-4-argon | Flagship | 0% | Not shown |
| gemini-3.1-pro-preview | Flagship | 0% | Not shown |
| gpt-6-astra | Flagship | 100% | Mastered |
| claude-fable-5-1 | Flagship | 0% | Not shown |
| gemini-3.8-flash | Mid tier | 0% | Not shown |
| gpt-6.1-sol | Mid tier | 77% | Not shown |
| claude-sonnet-5-5 | Mid tier | 0% | Not shown |
| gemini-3.5-flash-lite | Low cost | 0% | Not shown |
| gpt-6-luna | Low cost | 77% | Not shown |
| claude-haiku-5-5 | Low cost | 0% | Not shown |
Mastered means a probability of at least 90% that the model has this knobit, estimated from its graded answers. “Not shown” means the answers do not settle it either way. How the models are tested.
What it looks like in practice
Expected result: The column and the scale its currencies need
How it is assessed: Flags the deficient case and passes the acceptable one. Deficient: fact_payment.instructed_amount DECIMAL(14,2) with account_currency_code ranging over ISO 4217; a KWD payment of 12.345 is stored as 12.35 and the original instruction can no longer be reproduced Acceptable: Scale set to the widest minor unit in scope (DECIMAL(16,3)), the per-currency minor-unit digits held in the currency reference table, and a DQ rule that an amount's minor units match its currency. Or the single-currency scope stated in the column comment, so the next reviewer knows 2 was a decision
Also known as: One scale for every currency (generated DDL)
Related knobits
Builds on
- K-617 Recognises a physical domain differing from the logical domain
- K-853 Explains currency minor units
All 33 knobits of Generate and review DDL.
Source: Review checklist 08-ddl, row 16; ISO 4217