{
  "format": "dataset-manifest/1",
  "slug": "transaction-flow-analysis",
  "version": 1,
  "seed": "transaction-flow-analysis:1",
  "spec": {
    "format": "dataset/1",
    "slug": "transaction-flow-analysis",
    "name": "Transaction Flow Analysis",
    "tagline": "Hundreds of thousands of banking transactions, detailing accounts, transfers, and spending patterns.",
    "description": "Customers access their accounts to manage their finances, initiating transactions that can range from simple deposits to complex transfers between banks. Each transaction is linked to a specific category, such as groceries, utilities, or entertainment, allowing a detailed analysis of spending habits. The dataset captures a vast array of interactions, offering a comprehensive view of each customer's financial landscape. By examining these transactions, developers can model cash flow trends and identify key patterns in spending and saving behaviors.\n\nIn this dataset, the 'accounts' table contains information about each account holder, while the 'transactions' table tracks every monetary movement associated with these accounts. The 'categories' table provides context for each transaction, categorizing them into meaningful groups. The 'customers' table includes individual data on each account holder, and the 'banks' table represents the institutions where these accounts are held. One row in the 'transactions' table links to a unique account in the 'accounts' table and is also associated with a specific customer from the 'customers' table, highlighting the relationship between users and their financial activities. By joining these tables, developers can explore how different customers interact with their accounts and categorize their expenditures.\n\nThis data can answer critical questions such as: What are the most common transaction types? Which categories see the highest spending? Are there particular trends linked to specific times of the month or year? Additionally, users can identify unusual patterns, like spikes in high-value transfers, that could indicate significant financial events or anomalies. Practicing on this synthetic dataset allows developers to hone their skills in data manipulation, analysis, and visualization, making it a valuable resource for exploring real-world banking scenarios.",
    "domain": "banking",
    "shape": "transactional",
    "useCases": [
      "sql-practice",
      "orm-seeding"
    ],
    "keywords": [
      "transactions",
      "banking",
      "data analysis",
      "financial behavior",
      "spending patterns",
      "cash flow"
    ],
    "locale": "en",
    "license": "CC0-1.0",
    "version": 1,
    "tables": {
      "accounts": {
        "description": "This table holds account information linked to customers, detailing account types and balances.",
        "rows": 200,
        "columns": {
          "account_id": {
            "kind": "pk",
            "description": "Unique identifier for each account."
          },
          "customer_id": {
            "kind": "fk",
            "ref": "customers.customer_id",
            "description": "Identifier linking to the customer who owns the account."
          },
          "account_number": {
            "kind": "words",
            "min": 10,
            "max": 10,
            "description": "Unique account number assigned to each account."
          },
          "account_type": {
            "kind": "enum",
            "values": [
              "savings",
              "checking",
              "business"
            ],
            "description": "Type of account."
          },
          "balance": {
            "kind": "decimal",
            "min": 0,
            "max": 1000000,
            "scale": 2,
            "description": "Current balance in the account."
          }
        }
      },
      "transactions": {
        "description": "This table records individual transactions associated with accounts, including amounts and types.",
        "rows": 1000,
        "columns": {
          "transaction_id": {
            "kind": "pk",
            "description": "Unique identifier for each transaction."
          },
          "account_id": {
            "kind": "fk",
            "ref": "accounts.account_id",
            "description": "Identifier linking to the account involved in the transaction."
          },
          "transaction_date": {
            "kind": "datetime",
            "from": "2022-01-01",
            "to": "2023-12-31",
            "description": "Date and time when the transaction occurred.",
            "dayProfile": "waking"
          },
          "amount": {
            "kind": "decimal",
            "min": -10000,
            "max": 10000,
            "scale": 2,
            "description": "Amount of money involved in the transaction."
          },
          "transaction_type": {
            "kind": "enum",
            "values": [
              "deposit",
              "withdrawal",
              "transfer"
            ],
            "description": "Type of transaction."
          },
          "category_id": {
            "kind": "fk",
            "ref": "categories.category_id",
            "nullable": true,
            "description": "Identifier linking to the category of the transaction."
          }
        }
      },
      "categories": {
        "description": "This table classifies transactions into categories for easier analysis of spending patterns.",
        "rows": 10,
        "columns": {
          "category_id": {
            "kind": "pk",
            "description": "Unique identifier for each category."
          },
          "category_name": {
            "kind": "words",
            "min": 3,
            "max": 50,
            "description": "Name of the transaction category."
          }
        }
      },
      "customers": {
        "description": "This table contains information about customers who hold accounts.",
        "rows": 200,
        "columns": {
          "customer_id": {
            "kind": "pk",
            "description": "Unique identifier for each customer."
          },
          "full_name": {
            "kind": "fullName",
            "description": "Full name of the customer."
          },
          "email": {
            "kind": "email",
            "from": "full_name",
            "description": "Email address of the customer."
          },
          "phone": {
            "kind": "phone",
            "description": "Contact phone number of the customer."
          }
        }
      },
      "banks": {
        "description": "This table provides details about the banks managing the accounts.",
        "rows": 5,
        "columns": {
          "bank_id": {
            "kind": "pk",
            "description": "Unique identifier for each bank."
          },
          "bank_name": {
            "kind": "words",
            "min": 3,
            "max": 100,
            "description": "Name of the bank."
          },
          "location": {
            "kind": "words",
            "min": 3,
            "max": 100,
            "description": "Location of the bank's headquarters."
          }
        }
      }
    },
    "structure": "multi-table",
    "traits": [
      "monetary",
      "timestamped",
      "categorical"
    ],
    "analysisQuestions": [
      "What are the most common transaction categories?",
      "On which days do the highest transaction volumes occur?",
      "What is the average transaction amount by category?",
      "How do transaction amounts vary by account type?",
      "Are there any unusual high-value transactions in the dataset?"
    ],
    "suggestedQueries": [
      {
        "title": "Join Transactions with Accounts",
        "sql": "SELECT t.transaction_id, a.account_number, t.amount FROM transactions t JOIN accounts a ON t.account_id = a.account_id;",
        "dialect": "postgres"
      },
      {
        "title": "Aggregate Transactions by Category",
        "sql": "SELECT c.category_name, COUNT(t.transaction_id) as transaction_count FROM transactions t JOIN categories c ON t.category_id = c.category_id GROUP BY c.category_name;",
        "dialect": "postgres"
      },
      {
        "title": "Monthly Transaction Trends",
        "sql": "SELECT DATE_TRUNC('month', t.transaction_date) as month, SUM(t.amount) as total_amount FROM transactions t GROUP BY month ORDER BY month;",
        "dialect": "postgres"
      },
      {
        "title": "Customer Transaction Analysis",
        "sql": "SELECT cu.full_name, SUM(t.amount) as total_spent FROM transactions t JOIN accounts a ON t.account_id = a.account_id JOIN customers cu ON a.customer_id = cu.customer_id GROUP BY cu.full_name;",
        "dialect": "postgres"
      },
      {
        "title": "High-Value Transactions",
        "sql": "SELECT t.transaction_id, a.account_number, t.amount FROM transactions t JOIN accounts a ON t.account_id = a.account_id WHERE t.amount > 5000;",
        "dialect": "postgres"
      }
    ],
    "usageScenarios": [
      {
        "title": "Financial Analysts",
        "body": "Financial analysts can utilize this dataset to gain insights into customer spending behaviors and identify trends in cash flow. By analyzing transaction categories and amounts, they can develop strategies for enhancing customer engagement and optimizing financial products."
      },
      {
        "title": "Developers and Data Engineers",
        "body": "Developers and data engineers can use this dataset for practice in building and optimizing SQL queries, as well as for populating their applications with realistic financial data. This dataset serves as a great resource for ORM seeding and testing applications in a banking context."
      },
      {
        "title": "Marketing Teams",
        "body": "Marketing teams can leverage transaction data to understand customer preferences and spending trends. By identifying which categories customers spend the most on, they can tailor marketing campaigns and promotions to align with customer interests and optimize their outreach."
      },
      {
        "title": "Risk Management Professionals",
        "body": "Risk management professionals can analyze the dataset to identify unusual transaction patterns and potential fraud. By examining high-value transactions and customer behaviors, they can develop strategies to mitigate financial risks and enhance security measures."
      }
    ]
  },
  "counts": {
    "banks": 5,
    "categories": 10,
    "customers": 200,
    "accounts": 200,
    "transactions": 1000
  },
  "stats": {
    "accounts": {
      "rows": 200,
      "columns": {
        "account_id": {
          "nulls": 0,
          "distinct": 200,
          "min": 1,
          "max": 200
        },
        "customer_id": {
          "nulls": 0,
          "distinct": 124,
          "min": 1,
          "max": 200
        },
        "account_number": {
          "nulls": 0,
          "distinct": 200
        },
        "account_type": {
          "nulls": 0,
          "distinct": 3,
          "min": "business",
          "max": "savings"
        },
        "balance": {
          "nulls": 0,
          "distinct": 200,
          "min": 4239.03,
          "max": 997866.38
        }
      }
    },
    "transactions": {
      "rows": 1000,
      "columns": {
        "transaction_id": {
          "nulls": 0,
          "distinct": 1000,
          "min": 1,
          "max": 1000
        },
        "account_id": {
          "nulls": 0,
          "distinct": 199,
          "min": 1,
          "max": 200
        },
        "transaction_date": {
          "nulls": 0,
          "distinct": 1000,
          "min": "2022-01-01 01:47:27",
          "max": "2023-12-31 17:25:31"
        },
        "amount": {
          "nulls": 0,
          "distinct": 1000,
          "min": -9967.46,
          "max": 9958.57
        },
        "transaction_type": {
          "nulls": 0,
          "distinct": 3,
          "min": "deposit",
          "max": "withdrawal"
        },
        "category_id": {
          "nulls": 114,
          "distinct": 10,
          "min": 1,
          "max": 10
        }
      }
    },
    "categories": {
      "rows": 10,
      "columns": {
        "category_id": {
          "nulls": 0,
          "distinct": 10,
          "min": 1,
          "max": 10
        },
        "category_name": {
          "nulls": 0,
          "distinct": 10
        }
      }
    },
    "customers": {
      "rows": 200,
      "columns": {
        "customer_id": {
          "nulls": 0,
          "distinct": 200,
          "min": 1,
          "max": 200
        },
        "full_name": {
          "nulls": 0,
          "distinct": 196,
          "min": "Alice Mendes",
          "max": "Zoe Kim"
        },
        "email": {
          "nulls": 0,
          "distinct": 199
        },
        "phone": {
          "nulls": 0,
          "distinct": 196
        }
      }
    },
    "banks": {
      "rows": 5,
      "columns": {
        "bank_id": {
          "nulls": 0,
          "distinct": 5,
          "min": 1,
          "max": 5
        },
        "bank_name": {
          "nulls": 0,
          "distinct": 5
        },
        "location": {
          "nulls": 0,
          "distinct": 5
        }
      }
    }
  },
  "artifacts": [
    {
      "file": "csv/banks.csv",
      "format": "csv",
      "table": "banks",
      "key": "datasets/transaction-flow-analysis/v1/csv/banks.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/transaction-flow-analysis/v1/csv/banks.csv",
      "bytes": 3398,
      "sha256": "e57562eeb79326dd6268c73fb83fe984604f2ad3794abcd7810c8223c2e96aa1",
      "rows": 5,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/categories.csv",
      "format": "csv",
      "table": "categories",
      "key": "datasets/transaction-flow-analysis/v1/csv/categories.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/transaction-flow-analysis/v1/csv/categories.csv",
      "bytes": 1854,
      "sha256": "19c9e18954835801a726240a8ae7c6ad30e5f19e0454b49a6ae279e5c49045c1",
      "rows": 10,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/customers.csv",
      "format": "csv",
      "table": "customers",
      "key": "datasets/transaction-flow-analysis/v1/csv/customers.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/transaction-flow-analysis/v1/csv/customers.csv",
      "bytes": 11315,
      "sha256": "5aa3a48c645be831b95e4756a547d5de49e85151eb75a0f63913b0215fc34746",
      "rows": 200,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/accounts.csv",
      "format": "csv",
      "table": "accounts",
      "key": "datasets/transaction-flow-analysis/v1/csv/accounts.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/transaction-flow-analysis/v1/csv/accounts.csv",
      "bytes": 18826,
      "sha256": "8af25fdc352c12fb38c594a5358e20704ddb82bd6c8f34465d4337c94819bf87",
      "rows": 200,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/transactions.csv",
      "format": "csv",
      "table": "transactions",
      "key": "datasets/transaction-flow-analysis/v1/csv/transactions.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/transaction-flow-analysis/v1/csv/transactions.csv",
      "bytes": 48134,
      "sha256": "f3d344e609ed8b147b0c9fa185f7e7770a5879caeb1a0c6608d69b276646a7b6",
      "rows": 1000,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "transaction-flow-analysis.json",
      "format": "json",
      "table": null,
      "key": "datasets/transaction-flow-analysis/v1/transaction-flow-analysis.json",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/transaction-flow-analysis/v1/transaction-flow-analysis.json",
      "bytes": 281687,
      "sha256": "6eb8d98548eb206815c1a5fd75073580d4d399a92be46b0a050fdeb68b7158a9",
      "rows": null,
      "contentType": "application/json; charset=utf-8"
    },
    {
      "file": "sql/postgres.sql",
      "format": "sql-postgres",
      "table": null,
      "key": "datasets/transaction-flow-analysis/v1/sql/postgres.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/transaction-flow-analysis/v1/sql/postgres.sql",
      "bytes": 108039,
      "sha256": "91f7069446a52101257dea23de31c794433672215a8a5c7e7b02e4c9939fd838",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "sql/mysql.sql",
      "format": "sql-mysql",
      "table": null,
      "key": "datasets/transaction-flow-analysis/v1/sql/mysql.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/transaction-flow-analysis/v1/sql/mysql.sql",
      "bytes": 107401,
      "sha256": "60762588601ba44e5471d851744eb04a9f320ee368ab507f7a40288b9171dc24",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "sql/mssql.sql",
      "format": "sql-mssql",
      "table": null,
      "key": "datasets/transaction-flow-analysis/v1/sql/mssql.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/transaction-flow-analysis/v1/sql/mssql.sql",
      "bytes": 110744,
      "sha256": "826b06777d8c139cb220e2dd495138961db9e0c46de55f2609e6701b60ec497a",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "sql/sqlite.sql",
      "format": "sql-sqlite",
      "table": null,
      "key": "datasets/transaction-flow-analysis/v1/sql/sqlite.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/transaction-flow-analysis/v1/sql/sqlite.sql",
      "bytes": 107192,
      "sha256": "2570265244c915452c0787bcde7a65565fe9fa24773f51fac44fe5ff1bf9fd1b",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "prisma/seed.ts",
      "format": "prisma-seed",
      "table": null,
      "key": "datasets/transaction-flow-analysis/v1/prisma/seed.ts",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/transaction-flow-analysis/v1/prisma/seed.ts",
      "bytes": 239200,
      "sha256": "e6adb816a2a3dade0d3fcc2846e8685083a0a67f7aaf7413c92eec5b5feec684",
      "rows": null,
      "contentType": "application/typescript; charset=utf-8"
    },
    {
      "file": "django/fixtures.json",
      "format": "django-fixture",
      "table": null,
      "key": "datasets/transaction-flow-analysis/v1/django/fixtures.json",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/transaction-flow-analysis/v1/django/fixtures.json",
      "bytes": 329446,
      "sha256": "205fc3191bf8ce02707cba1840394df9d07d4660dcbe09c5f9e33d2f8b5acca4",
      "rows": null,
      "contentType": "application/json; charset=utf-8"
    }
  ],
  "publishedAt": 1788767431538,
  "updatedAt": 1788767431538
}
