{
  "format": "dataset-manifest/1",
  "slug": "invoice-management-software",
  "version": 1,
  "seed": "invoice-management-software:1",
  "spec": {
    "format": "dataset/1",
    "slug": "invoice-management-software",
    "name": "Invoice Ledger Insights",
    "tagline": "Streamline your billing and collections processes with insightful invoice data.",
    "description": "Businesses streamline their billing and collections processes, ensuring every transaction is meticulously tracked within an invoice management environment. Customers receive invoices that detail the products or services rendered, and these invoices are tied to various payment methods. Discounts and taxes are also vital components, influencing the overall billing picture. Operations often reveal patterns, such as the concentration of payments correlating closely with invoice dates, while discounts and credit memos tend to occur less frequently. These patterns can reflect negotiation outcomes and customer loyalty initiatives, providing valuable insights into customer behaviors and business strategies.\n\nThe primary table in this dataset is the 'invoices' table, where each row represents an individual invoice issued to a customer. Each invoice entry contains data on the invoice amount, the payment method used, any discounts applied, and relevant taxes. The structure allows for easy analysis of invoice performance over time, revealing trends in payment behaviors and the effectiveness of discounts.\n\nThis dataset is particularly useful for developers looking to practice data analysis skills, as it can answer questions such as how invoice amounts fluctuate with applied discounts, which payment methods are most popular, and the impact of invoice dates on payment timelines. It can help practitioners develop queries that yield insights into financial performance and customer interactions. \n\nAs a synthetic dataset, the information contained within is generated for training purposes, ensuring that users can safely experiment with the data without concerns about privacy or real-world implications.",
    "domain": "fintech",
    "shape": "ledger",
    "useCases": [
      "sql-practice",
      "teaching"
    ],
    "keywords": [
      "invoice",
      "billing",
      "payments",
      "discounts",
      "taxes",
      "fintech",
      "ledger",
      "analytics"
    ],
    "locale": "en",
    "license": "CC0-1.0",
    "version": 1,
    "tables": {
      "invoices": {
        "description": "Each row in this table represents an invoice issued to a customer, including details about the payment and any applicable discounts or taxes. The invoice date and payment date are key to tracking payment patterns and customer behaviors.",
        "rows": 500,
        "columns": {
          "id": {
            "kind": "pk",
            "description": "Unique identifier for the invoice."
          },
          "customer_id": {
            "kind": "int",
            "min": 1,
            "max": 1000,
            "description": "Identifier for the customer associated with the invoice."
          },
          "invoice_date": {
            "kind": "date",
            "from": "2023-01-01",
            "to": "2024-12-31",
            "description": "Date when the invoice was issued."
          },
          "payment_date": {
            "kind": "date",
            "after": "invoice_date",
            "withinDays": 30,
            "description": "Date when the payment for the invoice was received.",
            "nullable": true,
            "when": {
              "column": "payment_method",
              "in": [
                "credit_card",
                "bank_transfer",
                "paypal",
                "cash"
              ]
            }
          },
          "amount_due": {
            "kind": "decimal",
            "min": 10,
            "max": 5000,
            "scale": 2,
            "description": "Total amount due for the invoice."
          },
          "amount_paid": {
            "kind": "decimal",
            "min": 0,
            "max": 5000,
            "scale": 2,
            "description": "Total amount paid towards the invoice.",
            "nullable": true,
            "when": {
              "column": "payment_method",
              "in": [
                "credit_card",
                "bank_transfer",
                "paypal",
                "cash"
              ]
            }
          },
          "discount_applied": {
            "kind": "decimal",
            "min": 0,
            "max": 500,
            "scale": 2,
            "description": "Amount of discount applied to the invoice.",
            "nullable": true
          },
          "tax_amount": {
            "kind": "decimal",
            "min": 0,
            "max": 500,
            "scale": 2,
            "description": "Total tax amount applied to the invoice.",
            "nullable": true
          },
          "payment_method": {
            "kind": "enum",
            "values": [
              "credit_card",
              "bank_transfer",
              "paypal",
              "cash"
            ],
            "description": "Method used for payment."
          }
        }
      }
    },
    "structure": "single-table",
    "traits": [
      "monetary",
      "timestamped",
      "categorical"
    ],
    "analysisQuestions": [
      "What is the average time taken for payments after an invoice is issued?",
      "How do discounts impact the amount paid by customers?",
      "What payment methods are most frequently used by customers?",
      "Are there seasonal trends in invoice amounts or payment timings?",
      "What is the distribution of tax amounts applied across different invoices?"
    ],
    "suggestedQueries": [
      {
        "title": "Retrieve all invoices issued in January 2023",
        "sql": "SELECT * FROM invoices WHERE invoice_date BETWEEN '2023-01-01' AND '2023-01-31';",
        "dialect": "postgres"
      },
      {
        "title": "Calculate total amount due by payment method",
        "sql": "SELECT payment_method, SUM(amount_due) as total_due FROM invoices GROUP BY payment_method;",
        "dialect": "postgres"
      },
      {
        "title": "Find invoices with discounts applied",
        "sql": "SELECT * FROM invoices WHERE discount_applied > 0;",
        "dialect": "postgres"
      },
      {
        "title": "Average payment time by payment method",
        "sql": "SELECT payment_method, AVG(payment_date - invoice_date) as avg_payment_time FROM invoices GROUP BY payment_method;",
        "dialect": "postgres"
      }
    ],
    "usageScenarios": [
      {
        "title": "Financial Analyst",
        "body": "A financial analyst could use this dataset to analyze payment behaviors and trends in customer payments over time, helping the company optimize their billing strategies."
      },
      {
        "title": "SQL Instructor",
        "body": "An SQL instructor can leverage this dataset in classroom settings to demonstrate how to query financial data, focusing on aggregation and date functions to extract insights from invoice data."
      },
      {
        "title": "Business Intelligence Developer",
        "body": "A business intelligence developer might use this dataset to create dashboards that visualize payment trends, invoice amounts, and the impact of discounts, enabling better decision-making for the finance team."
      }
    ]
  },
  "counts": {
    "invoices": 500
  },
  "stats": {
    "invoices": {
      "rows": 500,
      "columns": {
        "id": {
          "nulls": 0,
          "distinct": 500,
          "min": 1,
          "max": 500
        },
        "customer_id": {
          "nulls": 0,
          "distinct": 396,
          "min": 2,
          "max": 999
        },
        "invoice_date": {
          "nulls": 0,
          "distinct": 366,
          "min": "2023-01-02",
          "max": "2024-12-30"
        },
        "payment_date": {
          "nulls": 0,
          "distinct": 373,
          "min": "2023-01-14",
          "max": "2025-01-21"
        },
        "amount_due": {
          "nulls": 0,
          "distinct": 500,
          "min": 43.93,
          "max": 4992.13
        },
        "amount_paid": {
          "nulls": 0,
          "distinct": 500,
          "min": 17.93,
          "max": 4992.72
        },
        "discount_applied": {
          "nulls": 49,
          "distinct": 446,
          "min": 0.44,
          "max": 499.82
        },
        "tax_amount": {
          "nulls": 44,
          "distinct": 452,
          "min": 0.06,
          "max": 499.83
        },
        "payment_method": {
          "nulls": 0,
          "distinct": 4,
          "min": "bank_transfer",
          "max": "paypal"
        }
      }
    }
  },
  "artifacts": [
    {
      "file": "csv/invoices.csv",
      "format": "csv",
      "table": "invoices",
      "key": "datasets/invoice-management-software/v1/csv/invoices.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/invoice-management-software/v1/csv/invoices.csv",
      "bytes": 34197,
      "sha256": "e4505f8d10c1272fda7da2633ff5de29d41afed9d285c5b3f0998149c20b16cc",
      "rows": 500,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "invoice-management-software.json",
      "format": "json",
      "table": null,
      "key": "datasets/invoice-management-software/v1/invoice-management-software.json",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/invoice-management-software/v1/invoice-management-software.json",
      "bytes": 141282,
      "sha256": "23d4d29eee7cd5d1c95a6b350831621c94661992349c6182e3eb0a317509d385",
      "rows": null,
      "contentType": "application/json; charset=utf-8"
    },
    {
      "file": "sql/postgres.sql",
      "format": "sql-postgres",
      "table": null,
      "key": "datasets/invoice-management-software/v1/sql/postgres.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/invoice-management-software/v1/sql/postgres.sql",
      "bytes": 45726,
      "sha256": "b75fac484194c207145a989348472f8d473a7ae68d7f8dbbd1be5276ad19da86",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "sql/mysql.sql",
      "format": "sql-mysql",
      "table": null,
      "key": "datasets/invoice-management-software/v1/sql/mysql.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/invoice-management-software/v1/sql/mysql.sql",
      "bytes": 45623,
      "sha256": "a69b9b2e734aa7b7e710aaf6d6735ca3236334c4011f3c7d10ca7d2d96d568b5",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "sql/mssql.sql",
      "format": "sql-mssql",
      "table": null,
      "key": "datasets/invoice-management-software/v1/sql/mssql.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/invoice-management-software/v1/sql/mssql.sql",
      "bytes": 47185,
      "sha256": "0b02d5f2d1e3d6dc2c8e96f90281f6b5b385b079fd5ce3343b43ca93d9e40494",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "sql/sqlite.sql",
      "format": "sql-sqlite",
      "table": null,
      "key": "datasets/invoice-management-software/v1/sql/sqlite.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/invoice-management-software/v1/sql/sqlite.sql",
      "bytes": 45603,
      "sha256": "213fb2509fab706833854ab1699eef4413b5840ce20e7961878998ca7a7f3813",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "prisma/seed.ts",
      "format": "prisma-seed",
      "table": null,
      "key": "datasets/invoice-management-software/v1/prisma/seed.ts",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/invoice-management-software/v1/prisma/seed.ts",
      "bytes": 112017,
      "sha256": "2f1f75183ebb6dc7a1bbd765e943615a2e7d1a9891153e404687fe9e024e850f",
      "rows": null,
      "contentType": "application/typescript; charset=utf-8"
    },
    {
      "file": "django/fixtures.json",
      "format": "django-fixture",
      "table": null,
      "key": "datasets/invoice-management-software/v1/django/fixtures.json",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/invoice-management-software/v1/django/fixtures.json",
      "bytes": 167278,
      "sha256": "6d7b3d147b1cd960030fb9b4c9705a3d35a26d39c34b28eafd26a7134cc6bcb8",
      "rows": null,
      "contentType": "application/json; charset=utf-8"
    }
  ],
  "publishedAt": 1788767836549,
  "updatedAt": 1788767836549
}
