{
  "format": "dataset-manifest/1",
  "slug": "wallet-ledger",
  "version": 1,
  "seed": "wallet-ledger:1",
  "spec": {
    "format": "dataset/1",
    "slug": "wallet-ledger",
    "name": "Wallet Ledger",
    "tagline": "A synthetic dataset for managing digital wallet transactions.",
    "description": "Users manage their digital wallets, performing various financial transactions that reflect their spending and saving behaviors. Each user holds one or multiple wallets that store their funds, providing a secure and convenient way to handle money. The core operations involve transferring funds between wallets, adding money through top-ups, and processing withdrawals. This dynamic environment creates a continuous flow of data, capturing the essence of modern fintech solutions.\n\nThe relationships between the tables create a cohesive view of the digital wallet operations. Each row in the 'users' table represents an individual user, identified by a unique user ID. The 'wallets' table links to users, with each wallet tied to a user ID, allowing for multiple wallets per user. Transactions are recorded in the 'transactions' table, where each entry details a specific financial movement, tied either to a debit or credit, ensuring a balanced ledger. The 'debits' table captures all money outflows, while the 'credits' table tracks inflows. Each transaction connects through its designated transaction ID, making it easy to see the complete flow of funds through the various wallets.\n\nThis dataset allows practitioners to explore questions around user behavior, transaction patterns, and wallet performance. Queries can reveal insights such as how often users top up their wallets, the average transaction size, and the frequency of withdrawals. Analyzing this data can aid in understanding user engagement and financial habits, making it a valuable resource for honing data manipulation and analysis skills. Remember, this is a synthetic dataset, designed to simulate real-world scenarios while allowing for extensive exploratory analysis.",
    "domain": "fintech",
    "shape": "ledger",
    "useCases": [
      "sql-practice",
      "test-fixtures"
    ],
    "keywords": [
      "digital wallet",
      "transactions",
      "ledger",
      "debit",
      "credit",
      "users",
      "wallets",
      "fintech",
      "synthetic data"
    ],
    "locale": "en",
    "license": "CC0-1.0",
    "version": 1,
    "tables": {
      "users": {
        "description": "This table contains information about users of the wallet ledger system. Each row represents a unique user identified by user_id, along with their full name, email address, and the date they created their account.",
        "rows": 100,
        "columns": {
          "user_id": {
            "kind": "pk",
            "description": "Unique identifier for each user."
          },
          "full_name": {
            "kind": "fullName",
            "nullable": false,
            "description": "The full name of the user."
          },
          "email": {
            "kind": "email",
            "nullable": false,
            "unique": true,
            "from": "full_name",
            "description": "The email address of the user."
          },
          "created_at": {
            "kind": "datetime",
            "from": "2020-01-01",
            "to": "2023-12-31",
            "description": "The date and time when the user account was created.",
            "dayProfile": "business"
          }
        }
      },
      "wallets": {
        "description": "This table stores wallet information for each user. Each row links to a user through user_id and includes the wallet's balance and currency type.",
        "rows": 100,
        "columns": {
          "wallet_id": {
            "kind": "pk",
            "description": "Unique identifier for each wallet."
          },
          "user_id": {
            "kind": "fk",
            "ref": "users.user_id",
            "description": "Foreign key linking to the users table."
          },
          "balance": {
            "kind": "decimal",
            "min": 0,
            "max": 10000,
            "scale": 2,
            "distribution": "normal",
            "description": "The current balance of the wallet."
          },
          "currency": {
            "kind": "enum",
            "values": [
              "USD",
              "EUR",
              "GBP"
            ],
            "weights": [
              0.5,
              0.3,
              0.2
            ],
            "description": "The currency of the wallet, can be USD, EUR, or GBP."
          }
        }
      },
      "transactions": {
        "description": "This table records all transactions made within the wallets. Each row includes a unique transaction_id, links to a wallet, and details about the transaction amount and type.",
        "rows": 500,
        "columns": {
          "transaction_id": {
            "kind": "pk",
            "description": "Unique identifier for each transaction."
          },
          "wallet_id": {
            "kind": "fk",
            "ref": "wallets.wallet_id",
            "description": "Foreign key linking to the wallets table."
          },
          "amount": {
            "kind": "decimal",
            "min": 1,
            "max": 1000,
            "scale": 2,
            "distribution": "long-tail",
            "description": "The amount involved in the transaction."
          },
          "transaction_type": {
            "kind": "enum",
            "values": [
              "top-up",
              "withdrawal",
              "transfer"
            ],
            "weights": [
              0.4,
              0.4,
              0.2
            ],
            "description": "The type of transaction: top-up, withdrawal, or transfer."
          },
          "created_at": {
            "kind": "datetime",
            "from": "2020-01-01",
            "to": "2023-12-31",
            "description": "The date and time when the transaction occurred.",
            "dayProfile": "waking",
            "trend": "growing"
          }
        }
      },
      "debits": {
        "description": "This table captures debit transactions associated with specific transactions. Each row links to a transaction and includes the debit amount and the wallet it is associated with.",
        "rows": 500,
        "columns": {
          "debit_id": {
            "kind": "pk",
            "description": "Unique identifier for each debit entry."
          },
          "transaction_id": {
            "kind": "fk",
            "ref": "transactions.transaction_id",
            "description": "Foreign key linking to the transactions table."
          },
          "amount": {
            "kind": "decimal",
            "min": 1,
            "max": 1000,
            "scale": 2,
            "description": "The amount that was debited."
          },
          "wallet_id": {
            "kind": "fk",
            "ref": "wallets.wallet_id",
            "description": "Foreign key linking to the wallets table."
          }
        }
      },
      "credits": {
        "description": "This table captures credit transactions associated with specific transactions. Each row links to a transaction and includes the credit amount and the wallet it is associated with.",
        "rows": 500,
        "columns": {
          "credit_id": {
            "kind": "pk",
            "description": "Unique identifier for each credit entry."
          },
          "transaction_id": {
            "kind": "fk",
            "ref": "transactions.transaction_id",
            "description": "Foreign key linking to the transactions table."
          },
          "amount": {
            "kind": "decimal",
            "min": 1,
            "max": 1000,
            "scale": 2,
            "description": "The amount that was credited."
          },
          "wallet_id": {
            "kind": "fk",
            "ref": "wallets.wallet_id",
            "description": "Foreign key linking to the wallets table."
          }
        }
      }
    },
    "suggestedQueries": [
      {
        "title": "Join Users and Wallets",
        "sql": "SELECT users.full_name, wallets.balance FROM users JOIN wallets ON users.user_id = wallets.user_id;",
        "dialect": "postgres"
      },
      {
        "title": "Total Transactions by User",
        "sql": "SELECT users.full_name, COUNT(transactions.transaction_id) AS transaction_count FROM users JOIN wallets ON users.user_id = wallets.user_id JOIN transactions ON wallets.wallet_id = transactions.wallet_id GROUP BY users.full_name;",
        "dialect": "postgres"
      },
      {
        "title": "Average Balance by Currency",
        "sql": "SELECT currency, AVG(balance) AS average_balance FROM wallets GROUP BY currency;",
        "dialect": "postgres"
      },
      {
        "title": "Total Amounts Debited and Credited",
        "sql": "SELECT SUM(debits.amount) AS total_debits, SUM(credits.amount) AS total_credits FROM debits JOIN credits ON debits.transaction_id = credits.transaction_id;",
        "dialect": "postgres"
      },
      {
        "title": "Transactions Over Time",
        "sql": "SELECT DATE(created_at) AS transaction_date, COUNT(transaction_id) AS transaction_count FROM transactions WHERE created_at BETWEEN '2023-01-01' AND '2023-12-31' GROUP BY transaction_date ORDER BY transaction_date;",
        "dialect": "postgres"
      }
    ],
    "usageScenarios": [
      {
        "title": "User Account Management",
        "body": "A customer support representative at a fintech company could use this dataset to manage user accounts effectively. By querying the users table, they can quickly find user details and verify account creation dates. This information is crucial for addressing user inquiries and resolving account-related issues, ensuring a smooth customer experience."
      },
      {
        "title": "Transaction Analysis",
        "body": "A financial analyst might access this dataset to analyze transaction patterns over time. By examining the transactions table, they can identify trends in user behavior, such as peak transaction days or the most common transaction types. This analysis can inform marketing strategies and help the company tailor its services to meet user needs."
      },
      {
        "title": "Wallet Performance Monitoring",
        "body": "A product manager could leverage this data to monitor wallet performance across different currencies. By querying the wallets table, they can assess average balances and identify which currency wallets are performing better. This insight is vital for making decisions about currency offerings and enhancing user engagement."
      }
    ],
    "analysisQuestions": [
      "What is the average balance of wallets by currency type?",
      "Which users have made the most transactions in the last month?",
      "What are the total amounts debited and credited over a specific period?"
    ]
  },
  "counts": {
    "users": 100,
    "wallets": 100,
    "transactions": 500,
    "credits": 500,
    "debits": 500
  },
  "stats": {
    "users": {
      "rows": 100,
      "columns": {
        "user_id": {
          "nulls": 0,
          "distinct": 100,
          "min": 1,
          "max": 100
        },
        "full_name": {
          "nulls": 0,
          "distinct": 99,
          "min": "Alice Ali",
          "max": "Zoe Oliveira"
        },
        "email": {
          "nulls": 0,
          "distinct": 100
        },
        "created_at": {
          "nulls": 0,
          "distinct": 100,
          "min": "2020-01-04 13:51:04",
          "max": "2023-12-25 14:10:08"
        }
      }
    },
    "wallets": {
      "rows": 100,
      "columns": {
        "wallet_id": {
          "nulls": 0,
          "distinct": 100,
          "min": 1,
          "max": 100
        },
        "user_id": {
          "nulls": 0,
          "distinct": 62,
          "min": 1,
          "max": 100
        },
        "balance": {
          "nulls": 0,
          "distinct": 100,
          "min": 796.67,
          "max": 8998.68
        },
        "currency": {
          "nulls": 0,
          "distinct": 3,
          "min": "EUR",
          "max": "USD"
        }
      }
    },
    "transactions": {
      "rows": 500,
      "columns": {
        "transaction_id": {
          "nulls": 0,
          "distinct": 500,
          "min": 1,
          "max": 500
        },
        "wallet_id": {
          "nulls": 0,
          "distinct": 100,
          "min": 1,
          "max": 100
        },
        "amount": {
          "nulls": 0,
          "distinct": 497,
          "min": 1.01,
          "max": 997.25
        },
        "transaction_type": {
          "nulls": 0,
          "distinct": 3,
          "min": "top-up",
          "max": "withdrawal"
        },
        "created_at": {
          "nulls": 0,
          "distinct": 500,
          "min": "2020-01-01 17:17:40",
          "max": "2023-12-28 19:56:09"
        }
      }
    },
    "debits": {
      "rows": 500,
      "columns": {
        "debit_id": {
          "nulls": 0,
          "distinct": 500,
          "min": 1,
          "max": 500
        },
        "transaction_id": {
          "nulls": 0,
          "distinct": 304,
          "min": 2,
          "max": 500
        },
        "amount": {
          "nulls": 0,
          "distinct": 500,
          "min": 4.44,
          "max": 996.83
        },
        "wallet_id": {
          "nulls": 0,
          "distinct": 99,
          "min": 1,
          "max": 100
        }
      }
    },
    "credits": {
      "rows": 500,
      "columns": {
        "credit_id": {
          "nulls": 0,
          "distinct": 500,
          "min": 1,
          "max": 500
        },
        "transaction_id": {
          "nulls": 0,
          "distinct": 329,
          "min": 2,
          "max": 500
        },
        "amount": {
          "nulls": 0,
          "distinct": 499,
          "min": 1.24,
          "max": 999.13
        },
        "wallet_id": {
          "nulls": 0,
          "distinct": 99,
          "min": 1,
          "max": 100
        }
      }
    }
  },
  "artifacts": [
    {
      "file": "csv/users.csv",
      "format": "csv",
      "table": "users",
      "key": "datasets/wallet-ledger/v1/csv/users.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/wallet-ledger/v1/csv/users.csv",
      "bytes": 6092,
      "sha256": "a1c0115da0a104583c7d9bd66214fd32a51144e665dc3bc69a1ea583de0251b1",
      "rows": 100,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/wallets.csv",
      "format": "csv",
      "table": "wallets",
      "key": "datasets/wallet-ledger/v1/csv/wallets.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/wallet-ledger/v1/csv/wallets.csv",
      "bytes": 1914,
      "sha256": "8503e872f64a9ff9cc91bfa77b3691f3f0cffdcda6add5a0bb646fcad32fd9d1",
      "rows": 100,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/transactions.csv",
      "format": "csv",
      "table": "transactions",
      "key": "datasets/wallet-ledger/v1/csv/transactions.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/wallet-ledger/v1/csv/transactions.csv",
      "bytes": 21781,
      "sha256": "15a6bff4386f53fb9dea1bfe17197747faba2d26a4551ad154d82b250d9402fd",
      "rows": 500,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/credits.csv",
      "format": "csv",
      "table": "credits",
      "key": "datasets/wallet-ledger/v1/csv/credits.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/wallet-ledger/v1/csv/credits.csv",
      "bytes": 9229,
      "sha256": "79e4ca88284ccb70f5bdb755e284f9ae94bf0870eda48668907f0f301fbd5c33",
      "rows": 500,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/debits.csv",
      "format": "csv",
      "table": "debits",
      "key": "datasets/wallet-ledger/v1/csv/debits.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/wallet-ledger/v1/csv/debits.csv",
      "bytes": 9224,
      "sha256": "0bf641637e6126b389624c4d3f0c8800a8feb430a1b3f42316c3c7d320e074b2",
      "rows": 500,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "wallet-ledger.json",
      "format": "json",
      "table": null,
      "key": "datasets/wallet-ledger/v1/wallet-ledger.json",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/wallet-ledger/v1/wallet-ledger.json",
      "bytes": 220926,
      "sha256": "ecb9bb2923a55fa5471899618cff7b8bde70c346b7d19d86cc74d108db67e486",
      "rows": null,
      "contentType": "application/json; charset=utf-8"
    },
    {
      "file": "sql/postgres.sql",
      "format": "sql-postgres",
      "table": null,
      "key": "datasets/wallet-ledger/v1/sql/postgres.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/wallet-ledger/v1/sql/postgres.sql",
      "bytes": 70274,
      "sha256": "01c38bad166529749beaeeaec482c9c2d85489cea8d5fc490e422e9a6cb7c21a",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "sql/mysql.sql",
      "format": "sql-mysql",
      "table": null,
      "key": "datasets/wallet-ledger/v1/sql/mysql.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/wallet-ledger/v1/sql/mysql.sql",
      "bytes": 69649,
      "sha256": "1c37bf5579aef26fdf14531e664576ed0e4b2dd28b42660a0056e199f646a6b6",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "sql/mssql.sql",
      "format": "sql-mssql",
      "table": null,
      "key": "datasets/wallet-ledger/v1/sql/mssql.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/wallet-ledger/v1/sql/mssql.sql",
      "bytes": 71354,
      "sha256": "5c97a46a367b8c566e4c16539523360c9bf6a01d3a2f2cc8d033206597cfd163",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "sql/sqlite.sql",
      "format": "sql-sqlite",
      "table": null,
      "key": "datasets/wallet-ledger/v1/sql/sqlite.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/wallet-ledger/v1/sql/sqlite.sql",
      "bytes": 69424,
      "sha256": "60623ff3babc7fe7e218bd77c32ef2e0f0dfd8dc869050a8254630186b5966f8",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "prisma/seed.ts",
      "format": "prisma-seed",
      "table": null,
      "key": "datasets/wallet-ledger/v1/prisma/seed.ts",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/wallet-ledger/v1/prisma/seed.ts",
      "bytes": 180230,
      "sha256": "d87d74bda989cadbef06caa57393c24aab35820aeb8018f72a1538856ba9ae0b",
      "rows": null,
      "contentType": "application/typescript; charset=utf-8"
    },
    {
      "file": "django/fixtures.json",
      "format": "django-fixture",
      "table": null,
      "key": "datasets/wallet-ledger/v1/django/fixtures.json",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/wallet-ledger/v1/django/fixtures.json",
      "bytes": 278225,
      "sha256": "ad460e112d20da5959d34113c57b95eb2f2b90d24d47daf50b513e484105de51",
      "rows": null,
      "contentType": "application/json; charset=utf-8"
    }
  ],
  "publishedAt": 1788767093513,
  "updatedAt": 1788767093513
}
