{
  "format": "dataset-manifest/1",
  "slug": "financial-lifecycle-data",
  "version": 2,
  "seed": "financial-lifecycle-data:1",
  "spec": {
    "format": "dataset/1",
    "slug": "financial-lifecycle-data",
    "name": "Financial Lifecycle Data",
    "tagline": "Customer demographics, accounts, transactions, loans, and investments in a banking environment.",
    "description": "Customers make financial decisions daily, navigating through a range of banking products and services. In this synthetic dataset, the focus is on how individuals interact with their financial lifecycles, from opening savings accounts to applying for loans and making investments. Each customer profile provides insight into demographics and account preferences, revealing patterns in financial behavior over time. \n\nThe data is structured across several tables that interrelate to form a cohesive picture of customer financial journeys. The 'customers' table contains demographic details, with one row representing an individual customer. This connects to the 'accounts' table, where each customer can have multiple accounts, illustrating the variety of banking services they utilize. The 'transactions' table provides detailed records of account activity, linking back to accounts through unique identifiers. The 'loans' table captures information about loan products that customers may take on, and the 'investments' table represents details of any investment accounts held. Each loan and investment can also be traced back to individual customers, indicating how various financial products are adopted and managed over time.\n\nThis dataset is ideal for answering questions such as: What types of accounts do different demographic groups prefer? How does transaction behavior change after taking out a loan? What patterns can be observed in investment choices among various customer segments? Practicing with this data enables users to explore financial trends, identify usage patterns, and develop insights into customer behavior, making it a valuable resource for those looking to enhance their data analysis skills.",
    "domain": "banking",
    "shape": "slowly-changing",
    "useCases": [
      "etl-pipelines",
      "teaching"
    ],
    "keywords": [
      "banking",
      "finance",
      "customers",
      "transactions",
      "loans",
      "investments",
      "accounts",
      "synthetic"
    ],
    "locale": "en",
    "license": "CC0-1.0",
    "version": 1,
    "tables": {
      "customers": {
        "description": "Each row represents a banking customer, including demographic information and a unique identifier.",
        "rows": 200,
        "columns": {
          "id": {
            "kind": "pk",
            "description": "Unique identifier for each customer."
          },
          "first_name": {
            "kind": "firstName",
            "description": "The customer's first name."
          },
          "last_name": {
            "kind": "lastName",
            "description": "The customer's last name."
          },
          "date_of_birth": {
            "kind": "date",
            "from": "1950-01-01",
            "to": "2005-01-01",
            "description": "The customer's date of birth."
          },
          "email": {
            "kind": "email",
            "from": [
              "first_name",
              "last_name"
            ],
            "description": "The customer's email address."
          },
          "registration_date": {
            "kind": "datetime",
            "from": "2020-01-01",
            "to": "2023-01-01",
            "description": "The date the customer registered with the bank.",
            "dayProfile": "business"
          }
        }
      },
      "accounts": {
        "description": "Rows in this table represent various accounts held by customers, linked to the customers table.",
        "rows": {
          "per": "customers",
          "via": "customer_id",
          "min": 1,
          "max": 3,
          "skew": "long-tail"
        },
        "columns": {
          "id": {
            "kind": "pk",
            "description": "Unique identifier for each account."
          },
          "customer_id": {
            "kind": "fk",
            "ref": "customers.id",
            "description": "The customer who owns the account."
          },
          "account_type": {
            "kind": "enum",
            "values": [
              "savings",
              "checking",
              "credit"
            ],
            "weights": [
              0.5,
              0.3,
              0.2
            ],
            "description": "Type of account."
          },
          "balance": {
            "kind": "decimal",
            "min": 0,
            "max": 100000,
            "scale": 2,
            "description": "Current balance in the account.",
            "distribution": "heavy-tail"
          },
          "opened_date": {
            "kind": "datetime",
            "from": "2020-01-01",
            "to": "2023-01-01",
            "description": "The date the account was opened.",
            "dayProfile": "business"
          }
        }
      },
      "transactions": {
        "description": "Each row represents a transaction made on an account, linked to the accounts table.",
        "rows": {
          "per": "accounts",
          "via": "account_id",
          "min": 1,
          "max": 10,
          "skew": "heavy-tail"
        },
        "columns": {
          "id": {
            "kind": "pk",
            "description": "Unique identifier for each transaction."
          },
          "account_id": {
            "kind": "fk",
            "ref": "accounts.id",
            "description": "The account that made the transaction."
          },
          "transaction_date": {
            "kind": "datetime",
            "from": "2020-01-01",
            "to": "2023-01-01",
            "description": "The date of the transaction.",
            "dayProfile": "waking",
            "trend": "growing"
          },
          "amount": {
            "kind": "decimal",
            "min": -1000,
            "max": 1000,
            "scale": 2,
            "description": "Amount of money involved in the transaction.",
            "distribution": "long-tail"
          },
          "transaction_type": {
            "kind": "enum",
            "values": [
              "deposit",
              "withdrawal"
            ],
            "weights": [
              0.6,
              0.4
            ],
            "description": "Type of the transaction."
          }
        }
      },
      "loans": {
        "description": "This table contains information about loans taken by customers, linked to the customers table.",
        "rows": {
          "per": "customers",
          "via": "customer_id",
          "min": 0,
          "max": 2,
          "skew": "long-tail"
        },
        "columns": {
          "id": {
            "kind": "pk",
            "description": "Unique identifier for each loan."
          },
          "customer_id": {
            "kind": "fk",
            "ref": "customers.id",
            "description": "The customer who took the loan."
          },
          "loan_type": {
            "kind": "enum",
            "values": [
              "personal",
              "mortgage",
              "auto"
            ],
            "weights": [
              0.5,
              0.3,
              0.2
            ],
            "description": "Type of loan."
          },
          "loan_amount": {
            "kind": "decimal",
            "min": 1000,
            "max": 50000,
            "scale": 2,
            "description": "Amount of the loan.",
            "distribution": "long-tail"
          },
          "start_date": {
            "kind": "datetime",
            "from": "2020-01-01",
            "to": "2023-01-01",
            "description": "The date the loan was granted.",
            "dayProfile": "business"
          }
        }
      },
      "investments": {
        "description": "Rows in this table represent investments made by customers, linked to the customers table.",
        "rows": {
          "per": "customers",
          "via": "customer_id",
          "min": 0,
          "max": 3,
          "skew": "long-tail"
        },
        "columns": {
          "id": {
            "kind": "pk",
            "description": "Unique identifier for each investment."
          },
          "customer_id": {
            "kind": "fk",
            "ref": "customers.id",
            "description": "The customer who made the investment."
          },
          "investment_type": {
            "kind": "enum",
            "values": [
              "stocks",
              "bonds",
              "mutual funds"
            ],
            "weights": [
              0.4,
              0.4,
              0.2
            ],
            "description": "Type of investment."
          },
          "amount_invested": {
            "kind": "decimal",
            "min": 100,
            "max": 20000,
            "scale": 2,
            "description": "Amount invested.",
            "distribution": "long-tail"
          },
          "investment_date": {
            "kind": "datetime",
            "from": "2020-01-01",
            "to": "2023-01-01",
            "description": "The date the investment was made.",
            "dayProfile": "business"
          }
        }
      }
    },
    "structure": "multi-table",
    "traits": [
      "timestamped",
      "monetary",
      "categorical",
      "nullable"
    ],
    "analysisQuestions": [
      "How do customer demographics influence the types of financial products they choose?",
      "What patterns can be observed in transaction types over different account types?",
      "How does the average loan amount vary by loan type among customers?",
      "What is the relationship between account balance and investment activity?",
      "Are there trends in the timing of investments based on customer age?"
    ],
    "suggestedQueries": [
      {
        "title": "Join Customers and Accounts",
        "sql": "SELECT c.first_name, c.last_name, a.account_type FROM customers c JOIN accounts a ON c.id = a.customer_id;",
        "dialect": "postgres"
      },
      {
        "title": "Aggregate Transactions by Account Type",
        "sql": "SELECT a.account_type, COUNT(t.id) as transaction_count FROM transactions t JOIN accounts a ON t.account_id = a.id GROUP BY a.account_type;",
        "dialect": "postgres"
      },
      {
        "title": "Average Loan Amount by Loan Type",
        "sql": "SELECT l.loan_type, AVG(l.loan_amount) as average_loan FROM loans l GROUP BY l.loan_type;",
        "dialect": "postgres"
      },
      {
        "title": "Investment Trends Over Time",
        "sql": "SELECT EXTRACT(YEAR FROM i.investment_date) as year, COUNT(i.id) as investment_count FROM investments i GROUP BY year ORDER BY year;",
        "dialect": "postgres"
      }
    ],
    "usageScenarios": [
      {
        "title": "Data Analysis for Banking Strategies",
        "body": "Bank analysts can utilize this dataset to identify patterns in customer behavior, such as account usage and transaction habits. By analyzing the data, they can develop targeted marketing strategies and improve customer retention by offering tailored financial products."
      },
      {
        "title": "Teaching Financial Literacy",
        "body": "Educators can use this dataset in classroom settings to teach students about personal finance, banking products, and the importance of managing financial decisions. The realistic scenarios provided by the data can stimulate discussions and practical exercises in financial literacy."
      },
      {
        "title": "ETL Pipeline Development",
        "body": "Data engineers can leverage this dataset to build and test ETL pipelines, extracting data for analytics and reporting purposes. The multi-table structure allows for practice in data transformation and loading processes, simulating real-world banking data workflows."
      },
      {
        "title": "Customer Segmentation Analysis",
        "body": "Marketing teams can analyze the dataset to segment customers based on their financial behaviors and preferences. By identifying clusters of customers with similar account types or transaction patterns, they can tailor marketing campaigns and enhance customer experience."
      }
    ]
  },
  "counts": {
    "customers": 200,
    "accounts": 331,
    "investments": 173,
    "loans": 123,
    "transactions": 1054
  },
  "stats": {
    "customers": {
      "rows": 200,
      "columns": {
        "id": {
          "nulls": 0,
          "distinct": 200,
          "min": 1,
          "max": 200
        },
        "first_name": {
          "nulls": 0,
          "distinct": 74,
          "min": "Alice",
          "max": "Zoe"
        },
        "last_name": {
          "nulls": 0,
          "distinct": 74,
          "min": "Adams",
          "max": "Zhang"
        },
        "date_of_birth": {
          "nulls": 0,
          "distinct": 198,
          "min": "1950-02-26",
          "max": "2004-07-18"
        },
        "email": {
          "nulls": 0,
          "distinct": 198
        },
        "registration_date": {
          "nulls": 0,
          "distinct": 200,
          "min": "2020-01-01 17:27:06",
          "max": "2022-12-29 11:51:25"
        }
      }
    },
    "accounts": {
      "rows": 331,
      "columns": {
        "id": {
          "nulls": 0,
          "distinct": 331,
          "min": 1,
          "max": 331
        },
        "customer_id": {
          "nulls": 0,
          "distinct": 200,
          "min": 1,
          "max": 200
        },
        "account_type": {
          "nulls": 0,
          "distinct": 3,
          "min": "checking",
          "max": "savings"
        },
        "balance": {
          "nulls": 0,
          "distinct": 330,
          "min": 0.01,
          "max": 99202.34
        },
        "opened_date": {
          "nulls": 0,
          "distinct": 331,
          "min": "2020-01-08 06:20:54",
          "max": "2022-12-29 11:10:44"
        }
      }
    },
    "transactions": {
      "rows": 1054,
      "columns": {
        "id": {
          "nulls": 0,
          "distinct": 1054,
          "min": 1,
          "max": 1054
        },
        "account_id": {
          "nulls": 0,
          "distinct": 331,
          "min": 1,
          "max": 331
        },
        "transaction_date": {
          "nulls": 0,
          "distinct": 1054,
          "min": "2020-01-01 13:52:15",
          "max": "2023-01-01 19:29:22"
        },
        "amount": {
          "nulls": 0,
          "distinct": 1049,
          "min": -999.96,
          "max": 990.21
        },
        "transaction_type": {
          "nulls": 0,
          "distinct": 2,
          "min": "deposit",
          "max": "withdrawal"
        }
      }
    },
    "loans": {
      "rows": 123,
      "columns": {
        "id": {
          "nulls": 0,
          "distinct": 123,
          "min": 1,
          "max": 123
        },
        "customer_id": {
          "nulls": 0,
          "distinct": 87,
          "min": 3,
          "max": 197
        },
        "loan_type": {
          "nulls": 0,
          "distinct": 3,
          "min": "auto",
          "max": "personal"
        },
        "loan_amount": {
          "nulls": 0,
          "distinct": 123,
          "min": 1000.14,
          "max": 49335.8
        },
        "start_date": {
          "nulls": 0,
          "distinct": 123,
          "min": "2020-01-08 08:41:56",
          "max": "2023-01-01 11:47:37"
        }
      }
    },
    "investments": {
      "rows": 173,
      "columns": {
        "id": {
          "nulls": 0,
          "distinct": 173,
          "min": 1,
          "max": 173
        },
        "customer_id": {
          "nulls": 0,
          "distinct": 96,
          "min": 2,
          "max": 199
        },
        "investment_type": {
          "nulls": 0,
          "distinct": 3,
          "min": "bonds",
          "max": "stocks"
        },
        "amount_invested": {
          "nulls": 0,
          "distinct": 173,
          "min": 100.46,
          "max": 19989.27
        },
        "investment_date": {
          "nulls": 0,
          "distinct": 173,
          "min": "2020-01-12 11:32:36",
          "max": "2022-12-26 15:45:45"
        }
      }
    }
  },
  "artifacts": [
    {
      "file": "csv/customers.csv",
      "format": "csv",
      "table": "customers",
      "key": "datasets/financial-lifecycle-data/v2/csv/customers.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/financial-lifecycle-data/v2/csv/customers.csv",
      "bytes": 14403,
      "sha256": "d357622a579a3e1f1386054f07b235ff01757cdfa9b3907478f151a98b318d21",
      "rows": 200,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/accounts.csv",
      "format": "csv",
      "table": "accounts",
      "key": "datasets/financial-lifecycle-data/v2/csv/accounts.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/financial-lifecycle-data/v2/csv/accounts.csv",
      "bytes": 14781,
      "sha256": "a13ca8a271765b0b919f8744b5646d732292d99c5fc7e300c45d046a6b5759fb",
      "rows": 331,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/investments.csv",
      "format": "csv",
      "table": "investments",
      "key": "datasets/financial-lifecycle-data/v2/csv/investments.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/financial-lifecycle-data/v2/csv/investments.csv",
      "bytes": 7622,
      "sha256": "fde3d827b948eb5d7841548d73a7e5c2c6d6f979a570e98786dc0952a0f1bba8",
      "rows": 173,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/loans.csv",
      "format": "csv",
      "table": "loans",
      "key": "datasets/financial-lifecycle-data/v2/csv/loans.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/financial-lifecycle-data/v2/csv/loans.csv",
      "bytes": 5485,
      "sha256": "ae98a05ab1125942916f23e7e4e7810e8cc1d8d51a567464f74b3b18d1613561",
      "rows": 123,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/transactions.csv",
      "format": "csv",
      "table": "transactions",
      "key": "datasets/financial-lifecycle-data/v2/csv/transactions.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/financial-lifecycle-data/v2/csv/transactions.csv",
      "bytes": 47912,
      "sha256": "3a74c89b5e9713054bfa3fe15846630b1f267e129090dcb908d438fa459a0ad4",
      "rows": 1054,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "financial-lifecycle-data.json",
      "format": "json",
      "table": null,
      "key": "datasets/financial-lifecycle-data/v2/financial-lifecycle-data.json",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/financial-lifecycle-data/v2/financial-lifecycle-data.json",
      "bytes": 318380,
      "sha256": "ab9413ae38545a54d89b6aa2ad9359b06cb047b334398311c3f784c9d93a8ceb",
      "rows": null,
      "contentType": "application/json; charset=utf-8"
    },
    {
      "file": "sql/postgres.sql",
      "format": "sql-postgres",
      "table": null,
      "key": "datasets/financial-lifecycle-data/v2/sql/postgres.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/financial-lifecycle-data/v2/sql/postgres.sql",
      "bytes": 121360,
      "sha256": "8ffbc1667ea1a256cde90027ae864bb0fd68cea9287c9eaae20fe5a54155064c",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "sql/mysql.sql",
      "format": "sql-mysql",
      "table": null,
      "key": "datasets/financial-lifecycle-data/v2/sql/mysql.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/financial-lifecycle-data/v2/sql/mysql.sql",
      "bytes": 120798,
      "sha256": "973161112c7d0a329bf41760891275fe2c7b0628004b09fe9a688a96df24a2ad",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "sql/mssql.sql",
      "format": "sql-mssql",
      "table": null,
      "key": "datasets/financial-lifecycle-data/v2/sql/mssql.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/financial-lifecycle-data/v2/sql/mssql.sql",
      "bytes": 125487,
      "sha256": "44bc2605c81be8d9273af9ea978444123205d9c08faf2d2da4d7f0e052b3cc65",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "sql/sqlite.sql",
      "format": "sql-sqlite",
      "table": null,
      "key": "datasets/financial-lifecycle-data/v2/sql/sqlite.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/financial-lifecycle-data/v2/sql/sqlite.sql",
      "bytes": 120577,
      "sha256": "d5fbeae2f3cd9ce65cb8e27ab8fd6e6cbfe3aefad722535cd7f1652ed0df6014",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "prisma/seed.ts",
      "format": "prisma-seed",
      "table": null,
      "key": "datasets/financial-lifecycle-data/v2/prisma/seed.ts",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/financial-lifecycle-data/v2/prisma/seed.ts",
      "bytes": 274383,
      "sha256": "56109ae7f1ba5cf10061086b4cbc6621d75d237657de8f217d679cb4781c9ee8",
      "rows": null,
      "contentType": "application/typescript; charset=utf-8"
    },
    {
      "file": "django/fixtures.json",
      "format": "django-fixture",
      "table": null,
      "key": "datasets/financial-lifecycle-data/v2/django/fixtures.json",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/financial-lifecycle-data/v2/django/fixtures.json",
      "bytes": 405981,
      "sha256": "c8170a6a6fea41d6a101a2d6fe4be61cac768bfc7ea844af9a5656184d53414b",
      "rows": null,
      "contentType": "application/json; charset=utf-8"
    }
  ],
  "publishedAt": 1788767321989,
  "updatedAt": 1788778756694
}
