One row per account. A customer can hold multiple accounts. Identifies the account type, currency, opening branch, and lifecycle dates.
| Column | Type | Description |
|---|---|---|
| account_idPK | BIGINT | Internal surrogate. |
| customer_idFK | BIGINT | References customers.customer_id. |
| account_number | TEXT | 11-digit Norwegian account number with a MOD-11 check digit. |
| iban | TEXT | NO-prefixed IBAN. Nullable for legacy accounts. |
| account_type | TEXT | One of checking, savings, high_yield_savings, credit_card, loan, mortgage. |
| currency | TEXT | ISO 4217 currency code. Mostly NOK. |
| opened_at | TIMESTAMP | When the account was opened. |
| closed_at | TIMESTAMP | When the account was closed. NULL if open. |
| product_code | TEXT | Internal product code. Examples: CHK-STD, SAV-HY, CC-GOLD, MTG-30Y. |
| branch_idFK | INTEGER | References branches.branch_id. Account's home branch. |
| account_id | customer_id | account_number | iban | account_type | currency | opened_at | closed_at | product_code | branch_id |
|---|---|---|---|---|---|---|---|---|---|
| 1 | 1 | 12345678903 | NO9312345678903 | checking | NOK | 2019-04-19 00:00:00 | NULL | CHK-STD | 14 |
| 2 | 1 | 23456789014 | NO4523456789014 | savings | NOK | 2019-04-19 00:00:00 | NULL | SAV-STD | 14 |
| 3 | 2 | 34567890125 | NO7634567890125 | credit_card | NOK | 2016-09-12 00:00:00 | NULL | CC-GOLD | 27 |
| 4 | 2 | 45678901236 | NO1245678901236 | mortgage | NOK | 2018-11-04 00:00:00 | NULL | MTG-30Y | 27 |
| 5 | 4 | 56789012347 | NULL | checking | EUR | 2014-02-22 00:00:00 | 2024-11-30 00:00:00 | CHK-STD | 41 |
5,4,3,2,7,6,5,4,3,2.currency can differ from the currency of individual transactions on it.high_yield_savings.iban may be NULL for some pre-2020 accounts.