{
  "format": "dataset-manifest/1",
  "slug": "financial-ledger-insights",
  "version": 1,
  "seed": "financial-ledger-insights:1",
  "spec": {
    "format": "dataset/1",
    "slug": "financial-ledger-insights",
    "name": "Financial Ledger Insights",
    "tagline": "Financial ledger data including accounts, sales invoices, vendor bills, payments, and bank statements.",
    "description": "Businesses track financial transactions meticulously to maintain accurate records of their cash flow and overall health. Sales invoices, vendor bills, and bank statements serve as the core components of financial operations, detailing the inflow and outflow of money within the organization. Each transaction reflects a moment in time, capturing everyday activities as well as anomalies such as significant purchases or unexpected revenue spikes, which can offer valuable insights into spending habits and financial performance.\n\nThe dataset consists of several interconnected tables: accounts, sales_invoices, vendor_bills, payments, bank_statements, and financial_adjustments. Each row in the accounts table represents a unique account with specific attributes like account ID, account type, and balance. The sales_invoices table contains detailed records of customer invoices, which link to accounts through account IDs, allowing for analysis of outstanding receivables. Vendor bills represent expenses incurred by the business, also linked to accounts, while payments track the transactions made to settle these invoices and bills. The bank_statements table records the actual movements of cash and helps reconcile the accounts' balances, while financial_adjustments provide a means to log any corrections or significant changes in the financial records.\n\nThis structure enables a range of analytical questions to be answered, such as identifying cash flow trends, assessing the timing of payments and receipts, and evaluating the impact of financial adjustments on overall financial health. Practicing with this data will help developers understand how to manipulate and analyze financial records effectively. It's important to note that the data provided here is synthetic, designed to mimic real-world scenarios while ensuring a safe and controlled environment for practice.",
    "domain": "fintech",
    "shape": "ledger",
    "useCases": [
      "sql-practice",
      "teaching"
    ],
    "keywords": [
      "financial",
      "ledger",
      "transactions",
      "invoices",
      "payments",
      "bills",
      "bank statements",
      "accounts",
      "synthetic data"
    ],
    "locale": "en",
    "license": "CC0-1.0",
    "version": 1,
    "tables": {
      "accounts": {
        "description": "This table lists all accounts used in financial transactions, linking to invoices and bills. Each account has a unique identifier and is categorized as either asset, liability, or equity.",
        "rows": 100,
        "columns": {
          "id": {
            "kind": "pk",
            "description": "Unique identifier for each account."
          },
          "account_name": {
            "kind": "words",
            "min": 2,
            "max": 50,
            "description": "The name of the account."
          },
          "account_type": {
            "kind": "enum",
            "values": [
              "asset",
              "liability",
              "equity"
            ],
            "description": "The type of account."
          }
        }
      },
      "sales_invoices": {
        "description": "This table records sales invoices issued to customers, linking to accounts and payments. Each invoice includes a total amount, issue date, and payment status.",
        "rows": 250,
        "columns": {
          "id": {
            "kind": "pk",
            "description": "Unique identifier for each sales invoice."
          },
          "account_id": {
            "kind": "fk",
            "ref": "accounts.id",
            "description": "The account linked to the customer."
          },
          "total_amount": {
            "kind": "decimal",
            "min": 100,
            "max": 10000,
            "scale": 2,
            "description": "The total amount of the invoice."
          },
          "issue_date": {
            "kind": "date",
            "from": "2022-01-01",
            "to": "2023-12-31",
            "description": "The date the invoice was issued.",
            "trend": "growing"
          },
          "payment_status": {
            "kind": "enum",
            "values": [
              "paid",
              "pending",
              "overdue"
            ],
            "description": "The current payment status of the invoice."
          }
        }
      },
      "vendor_bills": {
        "description": "This table tracks bills received from vendors, linking to accounts and payments. Each bill records the amount due, due date, and payment status.",
        "rows": 200,
        "columns": {
          "id": {
            "kind": "pk",
            "description": "Unique identifier for each vendor bill."
          },
          "account_id": {
            "kind": "fk",
            "ref": "accounts.id",
            "description": "The account linked to the vendor."
          },
          "amount_due": {
            "kind": "decimal",
            "min": 50,
            "max": 5000,
            "scale": 2,
            "description": "The amount due on the bill."
          },
          "due_date": {
            "kind": "date",
            "from": "2022-01-01",
            "to": "2023-12-31",
            "description": "The due date for the bill payment.",
            "trend": "seasonal"
          },
          "payment_status": {
            "kind": "enum",
            "values": [
              "paid",
              "pending",
              "overdue"
            ],
            "description": "The current payment status of the bill."
          }
        }
      },
      "payments": {
        "description": "This table records all payments made against invoices and bills, linking to the respective invoices and vendor bills. Each payment includes the amount and date.",
        "rows": 300,
        "columns": {
          "id": {
            "kind": "pk",
            "description": "Unique identifier for each payment."
          },
          "invoice_id": {
            "kind": "fk",
            "ref": "sales_invoices.id",
            "nullable": true,
            "description": "The invoice that this payment is linked to."
          },
          "bill_id": {
            "kind": "fk",
            "ref": "vendor_bills.id",
            "nullable": true,
            "description": "The vendor bill that this payment is linked to."
          },
          "amount": {
            "kind": "decimal",
            "min": 10,
            "max": 5000,
            "scale": 2,
            "description": "The amount paid."
          },
          "payment_date": {
            "kind": "date",
            "from": "2022-01-01",
            "to": "2023-12-31",
            "description": "The date the payment was made.",
            "trend": "growing"
          }
        }
      },
      "bank_statements": {
        "description": "This table captures bank statement entries that reflect overall account activity, linking to accounts. Each entry includes a transaction amount and date.",
        "rows": 150,
        "columns": {
          "id": {
            "kind": "pk",
            "description": "Unique identifier for each bank statement entry."
          },
          "account_id": {
            "kind": "fk",
            "ref": "accounts.id",
            "description": "The account associated with this bank statement entry."
          },
          "transaction_amount": {
            "kind": "decimal",
            "min": -10000,
            "max": 10000,
            "scale": 2,
            "description": "The amount of the transaction, negative for withdrawals."
          },
          "transaction_date": {
            "kind": "date",
            "from": "2022-01-01",
            "to": "2023-12-31",
            "description": "The date of the transaction.",
            "trend": "growing"
          }
        }
      },
      "financial_adjustments": {
        "description": "This table logs financial adjustments that may impact accounts, linking to accounts. Each adjustment includes an amount and reason.",
        "rows": 100,
        "columns": {
          "id": {
            "kind": "pk",
            "description": "Unique identifier for each financial adjustment."
          },
          "account_id": {
            "kind": "fk",
            "ref": "accounts.id",
            "description": "The account affected by the adjustment."
          },
          "adjustment_amount": {
            "kind": "decimal",
            "min": -5000,
            "max": 5000,
            "scale": 2,
            "description": "The amount of the adjustment."
          },
          "adjustment_reason": {
            "kind": "words",
            "min": 5,
            "max": 100,
            "description": "The reason for the adjustment."
          },
          "adjustment_date": {
            "kind": "date",
            "from": "2022-01-01",
            "to": "2023-12-31",
            "description": "The date the adjustment was made."
          }
        }
      }
    },
    "structure": "multi-table",
    "traits": [
      "monetary",
      "timestamped",
      "nullable"
    ],
    "analysisQuestions": [
      "What is the average amount of sales invoices issued per month?",
      "How do vendor bills compare to sales invoices in terms of total amounts?",
      "What are the most common reasons for financial adjustments?",
      "Which accounts have the highest transaction amounts in a given period?",
      "What percentage of invoices are paid on time versus overdue?"
    ],
    "suggestedQueries": [
      {
        "title": "Join Sales Invoices with Payments",
        "sql": "SELECT si.id, si.total_amount, p.amount FROM sales_invoices si LEFT JOIN payments p ON si.id = p.invoice_id;",
        "dialect": "postgres"
      },
      {
        "title": "Total Amount of Sales Invoices by Month",
        "sql": "SELECT DATE_TRUNC('month', issue_date) AS month, SUM(total_amount) AS total_sales FROM sales_invoices GROUP BY month;",
        "dialect": "postgres"
      },
      {
        "title": "Average Payment Amount per Invoice",
        "sql": "SELECT AVG(amount) AS avg_payment FROM payments WHERE invoice_id IS NOT NULL;",
        "dialect": "postgres"
      },
      {
        "title": "Count of Overdue Vendor Bills",
        "sql": "SELECT COUNT(*) FROM vendor_bills WHERE payment_status = 'overdue';",
        "dialect": "postgres"
      },
      {
        "title": "Transactions Over Time",
        "sql": "SELECT transaction_date, SUM(transaction_amount) AS net_amount FROM bank_statements GROUP BY transaction_date ORDER BY transaction_date;",
        "dialect": "postgres"
      }
    ],
    "usageScenarios": [
      {
        "title": "Financial Analyst Training",
        "body": "Financial analysts looking to hone their SQL skills can utilize this dataset to practice querying complex relationships between accounts, invoices, and payments. By analyzing trends in sales and vendor bills, they can learn to derive insights that influence financial decisions."
      },
      {
        "title": "Teaching Financial Management",
        "body": "Educators can use this dataset in finance courses to demonstrate how to track and analyze financial transactions. By engaging students with real-world scenarios, they can illustrate concepts of cash flow management and financial reporting."
      },
      {
        "title": "Startup Financial Planning",
        "body": "Entrepreneurs planning to launch their fintech startups can leverage this synthetic dataset to test their financial tracking systems. By simulating various transaction types and payment statuses, they can evaluate their accounting software's effectiveness before going live."
      },
      {
        "title": "Data Science in Finance",
        "body": "Data scientists interested in the fintech sector can apply this dataset to build predictive models for cash flow forecasting. By analyzing historical payment patterns and invoice trends, they can develop insights that aid in financial planning and risk assessment."
      }
    ]
  },
  "counts": {
    "accounts": 100,
    "bank_statements": 150,
    "financial_adjustments": 100,
    "sales_invoices": 250,
    "vendor_bills": 200,
    "payments": 300
  },
  "stats": {
    "accounts": {
      "rows": 100,
      "columns": {
        "id": {
          "nulls": 0,
          "distinct": 100,
          "min": 1,
          "max": 100
        },
        "account_name": {
          "nulls": 0,
          "distinct": 100
        },
        "account_type": {
          "nulls": 0,
          "distinct": 3,
          "min": "asset",
          "max": "liability"
        }
      }
    },
    "sales_invoices": {
      "rows": 250,
      "columns": {
        "id": {
          "nulls": 0,
          "distinct": 250,
          "min": 1,
          "max": 250
        },
        "account_id": {
          "nulls": 0,
          "distinct": 89,
          "min": 1,
          "max": 100
        },
        "total_amount": {
          "nulls": 0,
          "distinct": 250,
          "min": 138.62,
          "max": 9944.17
        },
        "issue_date": {
          "nulls": 0,
          "distinct": 213,
          "min": "2022-01-01",
          "max": "2023-12-26"
        },
        "payment_status": {
          "nulls": 0,
          "distinct": 3,
          "min": "overdue",
          "max": "pending"
        }
      }
    },
    "vendor_bills": {
      "rows": 200,
      "columns": {
        "id": {
          "nulls": 0,
          "distinct": 200,
          "min": 1,
          "max": 200
        },
        "account_id": {
          "nulls": 0,
          "distinct": 89,
          "min": 1,
          "max": 99
        },
        "amount_due": {
          "nulls": 0,
          "distinct": 200,
          "min": 58.16,
          "max": 4988.93
        },
        "due_date": {
          "nulls": 0,
          "distinct": 176,
          "min": "2022-01-01",
          "max": "2023-12-31"
        },
        "payment_status": {
          "nulls": 0,
          "distinct": 3,
          "min": "overdue",
          "max": "pending"
        }
      }
    },
    "payments": {
      "rows": 300,
      "columns": {
        "id": {
          "nulls": 0,
          "distinct": 300,
          "min": 1,
          "max": 300
        },
        "invoice_id": {
          "nulls": 36,
          "distinct": 164,
          "min": 1,
          "max": 250
        },
        "bill_id": {
          "nulls": 31,
          "distinct": 151,
          "min": 2,
          "max": 199
        },
        "amount": {
          "nulls": 0,
          "distinct": 300,
          "min": 50.07,
          "max": 4992.91
        },
        "payment_date": {
          "nulls": 0,
          "distinct": 241,
          "min": "2022-01-02",
          "max": "2023-12-31"
        }
      }
    },
    "bank_statements": {
      "rows": 150,
      "columns": {
        "id": {
          "nulls": 0,
          "distinct": 150,
          "min": 1,
          "max": 150
        },
        "account_id": {
          "nulls": 0,
          "distinct": 81,
          "min": 1,
          "max": 100
        },
        "transaction_amount": {
          "nulls": 0,
          "distinct": 150,
          "min": -9445.13,
          "max": 9988.49
        },
        "transaction_date": {
          "nulls": 0,
          "distinct": 133,
          "min": "2022-01-15",
          "max": "2023-12-31"
        }
      }
    },
    "financial_adjustments": {
      "rows": 100,
      "columns": {
        "id": {
          "nulls": 0,
          "distinct": 100,
          "min": 1,
          "max": 100
        },
        "account_id": {
          "nulls": 0,
          "distinct": 62,
          "min": 2,
          "max": 98
        },
        "adjustment_amount": {
          "nulls": 0,
          "distinct": 100,
          "min": -4949.78,
          "max": 4966.5
        },
        "adjustment_reason": {
          "nulls": 0,
          "distinct": 100
        },
        "adjustment_date": {
          "nulls": 0,
          "distinct": 91,
          "min": "2022-01-10",
          "max": "2023-12-30"
        }
      }
    }
  },
  "artifacts": [
    {
      "file": "csv/accounts.csv",
      "format": "csv",
      "table": "accounts",
      "key": "datasets/financial-ledger-insights/v1/csv/accounts.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/financial-ledger-insights/v1/csv/accounts.csv",
      "bytes": 20004,
      "sha256": "a5e0d508d2e16fc71e719c1229ddab04f67021d3201977139b7344f5c8810f06",
      "rows": 100,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/bank_statements.csv",
      "format": "csv",
      "table": "bank_statements",
      "key": "datasets/financial-ledger-insights/v1/csv/bank_statements.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/financial-ledger-insights/v1/csv/bank_statements.csv",
      "bytes": 4039,
      "sha256": "c7e3e2b08beae8b169937a4b8bb489d9bb9f797d9d2cdda0bf692535021991fc",
      "rows": 150,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/financial_adjustments.csv",
      "format": "csv",
      "table": "financial_adjustments",
      "key": "datasets/financial-ledger-insights/v1/csv/financial_adjustments.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/financial-ledger-insights/v1/csv/financial_adjustments.csv",
      "bytes": 39218,
      "sha256": "685e333db8cb824a02ce53f3fa362cfd11cdc4d159cf58db37d9bbb40ff8cb10",
      "rows": 100,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/sales_invoices.csv",
      "format": "csv",
      "table": "sales_invoices",
      "key": "datasets/financial-ledger-insights/v1/csv/sales_invoices.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/financial-ledger-insights/v1/csv/sales_invoices.csv",
      "bytes": 8417,
      "sha256": "2b5a3c8415ec8ca928ee411da6e6bc9fcd4e302de45b645acac251aa46c4566c",
      "rows": 250,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/vendor_bills.csv",
      "format": "csv",
      "table": "vendor_bills",
      "key": "datasets/financial-ledger-insights/v1/csv/vendor_bills.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/financial-ledger-insights/v1/csv/vendor_bills.csv",
      "bytes": 6686,
      "sha256": "1095e94b1c459019a0c50d6ffa7d0db26a0413679aff6cf072280cdb13ec2c48",
      "rows": 200,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/payments.csv",
      "format": "csv",
      "table": "payments",
      "key": "datasets/financial-ledger-insights/v1/csv/payments.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/financial-ledger-insights/v1/csv/payments.csv",
      "bytes": 9022,
      "sha256": "cc3d9901325924efbbf22d23d43a6b58e4dc8fb8978ac40c7d6a6dec502b6c89",
      "rows": 300,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "financial-ledger-insights.json",
      "format": "json",
      "table": null,
      "key": "datasets/financial-ledger-insights/v1/financial-ledger-insights.json",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/financial-ledger-insights/v1/financial-ledger-insights.json",
      "bytes": 207153,
      "sha256": "eeaa27aa9a0cb32ca7e97c8ddc2e0c35ec66715d173c30a1375796668f2fb678",
      "rows": null,
      "contentType": "application/json; charset=utf-8"
    },
    {
      "file": "sql/postgres.sql",
      "format": "sql-postgres",
      "table": null,
      "key": "datasets/financial-ledger-insights/v1/sql/postgres.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/financial-ledger-insights/v1/sql/postgres.sql",
      "bytes": 105381,
      "sha256": "db6356bbae754ed8a02b03230655345aa12654cf8257ee12fb87fc0b19a2f3c7",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "sql/mysql.sql",
      "format": "sql-mysql",
      "table": null,
      "key": "datasets/financial-ledger-insights/v1/sql/mysql.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/financial-ledger-insights/v1/sql/mysql.sql",
      "bytes": 104658,
      "sha256": "214af2740e24f06fabfa854fe74b7c6820a7f07773d2b7f43f6c23fb7318cfde",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "sql/mssql.sql",
      "format": "sql-mssql",
      "table": null,
      "key": "datasets/financial-ledger-insights/v1/sql/mssql.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/financial-ledger-insights/v1/sql/mssql.sql",
      "bytes": 106839,
      "sha256": "6ebcf913068b6a8b35f83cb11be63bb83b0d272f6691fd7a707242d6a0fda1bb",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "sql/sqlite.sql",
      "format": "sql-sqlite",
      "table": null,
      "key": "datasets/financial-ledger-insights/v1/sql/sqlite.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/financial-ledger-insights/v1/sql/sqlite.sql",
      "bytes": 104368,
      "sha256": "94f6b895c1a929db74ffdffef2a9eee30f8ffbcc0621c21133704e29870977ed",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "prisma/seed.ts",
      "format": "prisma-seed",
      "table": null,
      "key": "datasets/financial-ledger-insights/v1/prisma/seed.ts",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/financial-ledger-insights/v1/prisma/seed.ts",
      "bytes": 173451,
      "sha256": "be0f4cf7ae78d8de4c68bfa5b6c69c7b14ee65e076f3d84c12ae04d3d4d161af",
      "rows": null,
      "contentType": "application/typescript; charset=utf-8"
    },
    {
      "file": "django/fixtures.json",
      "format": "django-fixture",
      "table": null,
      "key": "datasets/financial-ledger-insights/v1/django/fixtures.json",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/financial-ledger-insights/v1/django/fixtures.json",
      "bytes": 257562,
      "sha256": "e709c7a78808a14f2cbcdd0e7d7dcf5568a3300692fe9b2e5968df5ddadb4d80",
      "rows": null,
      "contentType": "application/json; charset=utf-8"
    }
  ],
  "publishedAt": 1788767145204,
  "updatedAt": 1788767145204
}
