{
  "format": "dataset-manifest/1",
  "slug": "expense-tracker-records",
  "version": 1,
  "seed": "expense-tracker-records:1",
  "spec": {
    "format": "dataset/1",
    "slug": "expense-tracker-records",
    "name": "Expense Tracker Records",
    "tagline": "User transaction details, spending categories, budgets, and savings goals for personal finance management.",
    "description": "Users meticulously track their income and expenditures through various transactions, gaining insights into how they allocate their financial resources. This expense tracking operation focuses on capturing a user's financial habits, including everyday spending patterns and long-term budgeting strategies. Within the dataset, individuals monitor multiple small transactions, which typically aggregate in common spending categories like groceries, utilities, and entertainment, while also planning for larger, less frequent expenses such as vacations or substantial purchases.\n\nThe structure of the data comprises several interrelated tables. The 'users' table holds unique identifiers and relevant details for each user, serving as the foundation for all associated financial activities. Each user can have numerous entries in the 'transactions' table, which records individual spending and income events, thus illustrating the flow of money. These transactions are categorized using the 'categories' table, which classifies expenses into distinct groups. Users also set financial boundaries by defining budgets in the 'budgets' table, allowing them to allocate funds across different categories. Finally, the 'savings_goals' table captures specific targets users aim to achieve, providing an additional layer of insight into their financial planning.\n\nThrough this dataset, developers can explore various analytical questions such as identifying spending trends over time, assessing budget adherence, and evaluating the effectiveness of savings strategies. The combination of transactions, categories, budgets, and savings goals enables users to practice on a well-rounded personal finance management system. It should be noted that the data is synthetic, designed to simulate real-world financial behaviors while ensuring privacy and security.",
    "domain": "saas",
    "shape": "ledger",
    "useCases": [
      "sql-practice",
      "teaching"
    ],
    "keywords": [
      "personal finance",
      "transactions",
      "budgets",
      "savings",
      "expenses",
      "SQL practice"
    ],
    "locale": "en",
    "license": "CC0-1.0",
    "version": 1,
    "tables": {
      "users": {
        "description": "This table holds the user information, including their full name and unique identifier. Each user can have multiple transactions associated with them.",
        "rows": 200,
        "columns": {
          "id": {
            "kind": "pk",
            "description": "Unique identifier for each user."
          },
          "full_name": {
            "kind": "fullName",
            "description": "The user's full name.",
            "nullable": true
          },
          "email": {
            "kind": "email",
            "from": "full_name",
            "description": "The user's email address.",
            "nullable": true
          },
          "created_at": {
            "kind": "datetime",
            "from": "2022-01-01",
            "to": "2023-12-31",
            "description": "The date when the user account was created.",
            "dayProfile": "business"
          }
        }
      },
      "transactions": {
        "description": "This table records each transaction made by users, linking them to the user and the expense category. It captures the amount, date, and notes for each transaction.",
        "rows": {
          "per": "users",
          "via": "user_id",
          "min": 1,
          "max": 10,
          "skew": "long-tail"
        },
        "columns": {
          "id": {
            "kind": "pk",
            "description": "Unique identifier for each transaction."
          },
          "user_id": {
            "kind": "fk",
            "ref": "users.id",
            "description": "The ID of the user who made the transaction."
          },
          "category_id": {
            "kind": "fk",
            "ref": "categories.id",
            "description": "The ID of the category the transaction belongs to."
          },
          "amount": {
            "kind": "decimal",
            "min": 1,
            "max": 1000,
            "scale": 2,
            "description": "The amount of money spent or earned in the transaction."
          },
          "transaction_date": {
            "kind": "datetime",
            "from": "2022-01-01",
            "to": "2023-12-31",
            "description": "The date when the transaction occurred.",
            "dayProfile": "waking",
            "trend": "growing"
          },
          "notes": {
            "kind": "sentence",
            "max": 140,
            "description": "Any additional notes regarding the transaction.",
            "nullable": true
          }
        }
      },
      "categories": {
        "description": "This table lists predefined categories of expenses, which can be associated with transactions. It helps in organizing spending.",
        "rows": 15,
        "columns": {
          "id": {
            "kind": "pk",
            "description": "Unique identifier for each category."
          },
          "name": {
            "kind": "words",
            "max": 3,
            "description": "The name of the expense category (e.g., Groceries, Utilities)."
          },
          "created_at": {
            "kind": "datetime",
            "from": "2022-01-01",
            "to": "2023-12-31",
            "description": "The date when the category was created.",
            "dayProfile": "business"
          }
        }
      },
      "budgets": {
        "description": "This table records budget limits that users set for different categories over specific periods, helping them manage their spending effectively.",
        "rows": {
          "per": "users",
          "via": "user_id",
          "min": 1,
          "max": 5,
          "skew": "long-tail"
        },
        "columns": {
          "id": {
            "kind": "pk",
            "description": "Unique identifier for each budget record."
          },
          "user_id": {
            "kind": "fk",
            "ref": "users.id",
            "description": "The ID of the user who created the budget."
          },
          "category_id": {
            "kind": "fk",
            "ref": "categories.id",
            "description": "The category that this budget applies to."
          },
          "budget_amount": {
            "kind": "decimal",
            "min": 10,
            "max": 5000,
            "scale": 2,
            "description": "The budget limit set by the user for this category.",
            "nullable": true
          },
          "start_date": {
            "kind": "datetime",
            "from": "2022-01-01",
            "to": "2023-12-31",
            "description": "The start date of the budget period."
          },
          "end_date": {
            "kind": "datetime",
            "from": "2022-01-01",
            "to": "2023-12-31",
            "description": "The end date of the budget period."
          }
        }
      },
      "savings_goals": {
        "description": "This table records the savings goals set by users, indicating the amount they wish to save and the target date for achieving it.",
        "rows": {
          "per": "users",
          "via": "user_id",
          "min": 0,
          "max": 3,
          "skew": "long-tail"
        },
        "columns": {
          "id": {
            "kind": "pk",
            "description": "Unique identifier for each savings goal."
          },
          "user_id": {
            "kind": "fk",
            "ref": "users.id",
            "description": "The ID of the user who set the savings goal."
          },
          "goal_amount": {
            "kind": "decimal",
            "min": 50,
            "max": 10000,
            "scale": 2,
            "description": "The amount the user aims to save."
          },
          "target_date": {
            "kind": "datetime",
            "from": "2022-01-01",
            "to": "2025-12-31",
            "description": "The target date to achieve the savings goal."
          },
          "notes": {
            "kind": "sentence",
            "max": 140,
            "description": "Any additional notes regarding the savings goal.",
            "nullable": true
          }
        }
      }
    },
    "structure": "multi-table",
    "traits": [
      "categorical",
      "monetary",
      "timestamped",
      "nullable"
    ],
    "analysisQuestions": [
      "What categories do users spend the most money on?",
      "How often do users exceed their budget limits?",
      "What is the average amount users save towards their goals each month?",
      "Which users are the most diligent in achieving their savings goals?",
      "What trends can be identified in spending over different months?"
    ],
    "suggestedQueries": [
      {
        "title": "Get all transactions for a specific user",
        "sql": "SELECT * FROM transactions WHERE user_id = 1;",
        "dialect": "postgres"
      },
      {
        "title": "Sum of expenses by category",
        "sql": "SELECT categories.name, SUM(transactions.amount) as total_spent FROM transactions JOIN categories ON transactions.category_id = categories.id GROUP BY categories.name;",
        "dialect": "postgres"
      },
      {
        "title": "Monthly spending trend for a user",
        "sql": "SELECT DATE_TRUNC('month', transaction_date) AS month, SUM(amount) AS total_spent FROM transactions WHERE user_id = 1 GROUP BY month ORDER BY month;",
        "dialect": "postgres"
      },
      {
        "title": "Budgets exceeded by users",
        "sql": "SELECT user_id, category_id, budget_amount, SUM(amount) AS total_spent FROM budgets LEFT JOIN transactions ON budgets.category_id = transactions.category_id GROUP BY user_id, category_id, budget_amount HAVING SUM(amount) > budget_amount;",
        "dialect": "postgres"
      },
      {
        "title": "Savings goal achievement rate",
        "sql": "SELECT user_id, COUNT(*) FILTER (WHERE goal_amount <= (SELECT SUM(amount) FROM transactions WHERE user_id = users.id)) AS achieved_goals FROM savings_goals JOIN users ON savings_goals.user_id = users.id GROUP BY user_id;",
        "dialect": "postgres"
      }
    ],
    "usageScenarios": [
      {
        "title": "Personal Finance Education",
        "body": "Educators can use this dataset to teach students the fundamentals of personal finance management. By analyzing the relationships between transactions, budgets, and savings goals, students learn to track their financial health and understand budgeting concepts."
      },
      {
        "title": "SQL Practice for Analysts",
        "body": "Data analysts can practice their SQL skills using this dataset to write complex queries that aggregate and analyze financial data. This hands-on experience helps them develop the ability to derive insights from transactional data, which is crucial for financial analysis."
      },
      {
        "title": "App Development Testing",
        "body": "Developers building personal finance management applications can use this dataset to simulate user behavior and test features such as transaction tracking, budget setting, and savings goal management. This allows them to create robust applications that cater to user needs."
      },
      {
        "title": "Financial Behavior Research",
        "body": "Researchers studying consumer behavior can leverage this dataset to analyze spending patterns, budgeting habits, and goal achievement rates among different demographics. This research can inform financial literacy programs and product development in the fintech space."
      }
    ]
  },
  "counts": {
    "categories": 15,
    "users": 200,
    "budgets": 443,
    "savings_goals": 168,
    "transactions": 761
  },
  "stats": {
    "users": {
      "rows": 200,
      "columns": {
        "id": {
          "nulls": 0,
          "distinct": 200,
          "min": 1,
          "max": 200
        },
        "full_name": {
          "nulls": 20,
          "distinct": 177,
          "min": "Alice Demir",
          "max": "Zoe Ahmed"
        },
        "email": {
          "nulls": 34,
          "distinct": 165
        },
        "created_at": {
          "nulls": 0,
          "distinct": 200,
          "min": "2022-01-01 16:12:30",
          "max": "2023-12-29 21:43:01"
        }
      }
    },
    "transactions": {
      "rows": 761,
      "columns": {
        "id": {
          "nulls": 0,
          "distinct": 761,
          "min": 1,
          "max": 761
        },
        "user_id": {
          "nulls": 0,
          "distinct": 200,
          "min": 1,
          "max": 200
        },
        "category_id": {
          "nulls": 0,
          "distinct": 15,
          "min": 1,
          "max": 15
        },
        "amount": {
          "nulls": 0,
          "distinct": 759,
          "min": 1.03,
          "max": 999.39
        },
        "transaction_date": {
          "nulls": 0,
          "distinct": 761,
          "min": "2022-01-01 17:36:49",
          "max": "2023-12-31 23:45:11"
        },
        "notes": {
          "nulls": 77,
          "distinct": 675
        }
      }
    },
    "categories": {
      "rows": 15,
      "columns": {
        "id": {
          "nulls": 0,
          "distinct": 15,
          "min": 1,
          "max": 15
        },
        "name": {
          "nulls": 0,
          "distinct": 15
        },
        "created_at": {
          "nulls": 0,
          "distinct": 15,
          "min": "2022-03-23 10:17:08",
          "max": "2023-10-03 10:09:19"
        }
      }
    },
    "budgets": {
      "rows": 443,
      "columns": {
        "id": {
          "nulls": 0,
          "distinct": 443,
          "min": 1,
          "max": 443
        },
        "user_id": {
          "nulls": 0,
          "distinct": 200,
          "min": 1,
          "max": 200
        },
        "category_id": {
          "nulls": 0,
          "distinct": 15,
          "min": 1,
          "max": 15
        },
        "budget_amount": {
          "nulls": 44,
          "distinct": 399,
          "min": 38.56,
          "max": 4937.07
        },
        "start_date": {
          "nulls": 0,
          "distinct": 443,
          "min": "2022-01-03 14:27:17",
          "max": "2023-12-30 16:56:59"
        },
        "end_date": {
          "nulls": 0,
          "distinct": 443,
          "min": "2022-01-05 22:47:02",
          "max": "2023-12-28 23:10:43"
        }
      }
    },
    "savings_goals": {
      "rows": 168,
      "columns": {
        "id": {
          "nulls": 0,
          "distinct": 168,
          "min": 1,
          "max": 168
        },
        "user_id": {
          "nulls": 0,
          "distinct": 96,
          "min": 3,
          "max": 200
        },
        "goal_amount": {
          "nulls": 0,
          "distinct": 168,
          "min": 89.32,
          "max": 9880.56
        },
        "target_date": {
          "nulls": 0,
          "distinct": 168,
          "min": "2022-01-10 12:44:42",
          "max": "2025-12-21 18:05:41"
        },
        "notes": {
          "nulls": 17,
          "distinct": 151
        }
      }
    }
  },
  "artifacts": [
    {
      "file": "csv/categories.csv",
      "format": "csv",
      "table": "categories",
      "key": "datasets/expense-tracker-records/v1/csv/categories.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/expense-tracker-records/v1/csv/categories.csv",
      "bytes": 622,
      "sha256": "3b2628c2b908aa7c3b273d40c51e50d70a432311096758c1bfeee1031208e237",
      "rows": 15,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/users.csv",
      "format": "csv",
      "table": "users",
      "key": "datasets/expense-tracker-records/v1/csv/users.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/expense-tracker-records/v1/csv/users.csv",
      "bytes": 11141,
      "sha256": "cde58ee52babbc8d045c85769acd5364f0ff354f58156cbadf2555615b8b84c8",
      "rows": 200,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/budgets.csv",
      "format": "csv",
      "table": "budgets",
      "key": "datasets/expense-tracker-records/v1/csv/budgets.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/expense-tracker-records/v1/csv/budgets.csv",
      "bytes": 25653,
      "sha256": "d7d968a408ea3a39ccdc82250e284d648dd9016d3293cacdd67d00cea6c92f45",
      "rows": 443,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/savings_goals.csv",
      "format": "csv",
      "table": "savings_goals",
      "key": "datasets/expense-tracker-records/v1/csv/savings_goals.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/expense-tracker-records/v1/csv/savings_goals.csv",
      "bytes": 14464,
      "sha256": "e8bf2fee28c7d7e808dcd57b7391f6ff20b96b8ee8fac997da985242d912b375",
      "rows": 168,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/transactions.csv",
      "format": "csv",
      "table": "transactions",
      "key": "datasets/expense-tracker-records/v1/csv/transactions.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/expense-tracker-records/v1/csv/transactions.csv",
      "bytes": 67613,
      "sha256": "667a4139afa0bfea2ba23480d899f32d24b0e19723b650a9427a15be49e17802",
      "rows": 761,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "expense-tracker-records.json",
      "format": "json",
      "table": null,
      "key": "datasets/expense-tracker-records/v1/expense-tracker-records.json",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/expense-tracker-records/v1/expense-tracker-records.json",
      "bytes": 311387,
      "sha256": "8cdafa2b1f1c0cd95cd6efd2f8d3da1c54c1d3ddfc47155eb5ed2dd7f7bdb5c5",
      "rows": null,
      "contentType": "application/json; charset=utf-8"
    },
    {
      "file": "sql/postgres.sql",
      "format": "sql-postgres",
      "table": null,
      "key": "datasets/expense-tracker-records/v1/sql/postgres.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/expense-tracker-records/v1/sql/postgres.sql",
      "bytes": 146455,
      "sha256": "970ebd57f97be568e6cb18658d724e53c2d77535a7abceb2999daba3aa194593",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "sql/mysql.sql",
      "format": "sql-mysql",
      "table": null,
      "key": "datasets/expense-tracker-records/v1/sql/mysql.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/expense-tracker-records/v1/sql/mysql.sql",
      "bytes": 145884,
      "sha256": "e262132d8299f6b032ae5df35ef8bace6af19c63fb82f37ddc4c2e295fd3e208",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "sql/mssql.sql",
      "format": "sql-mssql",
      "table": null,
      "key": "datasets/expense-tracker-records/v1/sql/mssql.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/expense-tracker-records/v1/sql/mssql.sql",
      "bytes": 149456,
      "sha256": "8e2585dd24dd89fe5331814e21fc941bb9a399eabd190754fd87c4d45de5dc57",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "sql/sqlite.sql",
      "format": "sql-sqlite",
      "table": null,
      "key": "datasets/expense-tracker-records/v1/sql/sqlite.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/expense-tracker-records/v1/sql/sqlite.sql",
      "bytes": 145655,
      "sha256": "866a237a9267ab804539d9a9395ebca2c9055bdc653feda259e6d45e24d0362f",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "prisma/seed.ts",
      "format": "prisma-seed",
      "table": null,
      "key": "datasets/expense-tracker-records/v1/prisma/seed.ts",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/expense-tracker-records/v1/prisma/seed.ts",
      "bytes": 272645,
      "sha256": "1bc9ccb9e57bb5a7a1bc29d6ce336a6bf441eea6d3a118add532a289dc24eb07",
      "rows": null,
      "contentType": "application/typescript; charset=utf-8"
    },
    {
      "file": "django/fixtures.json",
      "format": "django-fixture",
      "table": null,
      "key": "datasets/expense-tracker-records/v1/django/fixtures.json",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/expense-tracker-records/v1/django/fixtures.json",
      "bytes": 380939,
      "sha256": "ff32eab40d5d4e48b1ba206f998ee04bdf13a32d1d3b9cdf04d22f97b939b85b",
      "rows": null,
      "contentType": "application/json; charset=utf-8"
    }
  ],
  "publishedAt": 1788734389475,
  "updatedAt": 1788734389475
}
