{
  "format": "dataset-manifest/1",
  "slug": "loan-management-sample-database",
  "version": 1,
  "seed": "flagship:loan-management-sample-database:1k",
  "engine": 2,
  "engineVersion": "1.0.0",
  "spec": {
    "format": "dataset/1",
    "engine": 2,
    "slug": "loan-management-sample-database",
    "name": "Loan management sample database",
    "tagline": "Applications, approved loans, instalments, payments and the delinquencies, collections and write-offs that follow.",
    "description": "A consumer lending book: customers apply for loans through branches, officers review and approve them, and every approved loan carries a schedule of monthly instalments, the payments made against it, and fees and penalties along the way. A small share of loans fall behind, go to collections, end up in court or are written off. Every loan starts after its application, every payment after its loan, and every instalment total is its principal plus its interest.",
    "domain": "banking",
    "shape": "transactional",
    "useCases": [
      "sql-practice",
      "bi-dashboards",
      "test-fixtures"
    ],
    "keywords": [
      "loans",
      "lending",
      "repayment schedule",
      "delinquency",
      "sample database"
    ],
    "locale": "en_US",
    "license": "CC0-1.0",
    "version": 1,
    "seed": "flagship:loan-management-sample-database",
    "tables": {
      "active_loans": {
        "description": "Rows for the active_loans table.",
        "rows": 25,
        "columns": {
          "id": {
            "kind": "pk"
          },
          "application_id": {
            "kind": "fk",
            "ref": "loan_applications.id",
            "skew": "long-tail"
          },
          "branch_id": {
            "kind": "fk",
            "ref": "branches.id",
            "skew": "long-tail"
          },
          "customer_id": {
            "kind": "fk",
            "ref": "customers.id",
            "skew": "long-tail"
          },
          "end_date": {
            "kind": "date",
            "after": "start_date",
            "withinDays": 2500
          },
          "interest_rate": {
            "kind": "decimal",
            "min": 3.5,
            "max": 24,
            "scale": 2
          },
          "loan_product_id": {
            "kind": "fk",
            "ref": "loan_products.id",
            "skew": "long-tail"
          },
          "officer_id": {
            "kind": "fk",
            "ref": "employees.id",
            "skew": "long-tail"
          },
          "principal_amount": {
            "kind": "decimal",
            "min": 1000,
            "max": 400000,
            "scale": 2,
            "distribution": "long-tail"
          },
          "start_date": {
            "kind": "date",
            "after": "application_id.application_date",
            "withinDays": 45
          },
          "status": {
            "kind": "enum",
            "values": [
              "active",
              "closed",
              "defaulted",
              "written_off"
            ],
            "weights": [
              58,
              34,
              5,
              3
            ]
          },
          "term_months": {
            "kind": "int",
            "min": 6,
            "max": 84
          }
        }
      },
      "application_documents": {
        "description": "Rows for the application_documents table.",
        "rows": 80,
        "columns": {
          "id": {
            "kind": "pk"
          },
          "application_id": {
            "kind": "fk",
            "ref": "loan_applications.id",
            "skew": "long-tail"
          },
          "document_type": {
            "kind": "enum",
            "values": [
              "id_card",
              "pay_stub",
              "bank_statement",
              "tax_return",
              "utility_bill",
              "collateral_deed"
            ],
            "weights": [
              22,
              24,
              24,
              12,
              12,
              6
            ]
          },
          "file_name": {
            "kind": "pattern",
            "pattern": "doc-########.pdf"
          },
          "file_path": {
            "kind": "pattern",
            "pattern": "/documents/####/########.pdf"
          },
          "upload_date": {
            "kind": "datetime",
            "after": "application_id.application_date",
            "withinDays": 14,
            "dayProfile": "business"
          },
          "verification_status": {
            "kind": "enum",
            "values": [
              "pending",
              "verified",
              "rejected"
            ],
            "weights": [
              12,
              80,
              8
            ]
          },
          "verified_by": {
            "kind": "fk",
            "ref": "employees.id",
            "skew": "long-tail"
          }
        }
      },
      "application_reviews": {
        "description": "Rows for the application_reviews table.",
        "rows": 38,
        "columns": {
          "id": {
            "kind": "pk"
          },
          "application_id": {
            "kind": "fk",
            "ref": "loan_applications.id",
            "skew": "long-tail"
          },
          "comments": {
            "kind": "sentence"
          },
          "decision": {
            "kind": "enum",
            "values": [
              "approved",
              "rejected",
              "referred"
            ],
            "weights": [
              66,
              22,
              12
            ]
          },
          "review_date": {
            "kind": "datetime",
            "after": "application_id.application_date",
            "withinDays": 21,
            "dayProfile": "business"
          },
          "reviewer_id": {
            "kind": "fk",
            "ref": "employees.id",
            "skew": "long-tail"
          }
        }
      },
      "audit_logs": {
        "description": "Rows for the audit_logs table.",
        "rows": 30,
        "columns": {
          "id": {
            "kind": "pk"
          },
          "action_performed": {
            "kind": "enum",
            "values": [
              "insert",
              "update",
              "delete"
            ],
            "weights": [
              38,
              58,
              4
            ]
          },
          "employee_id": {
            "kind": "fk",
            "ref": "employees.id",
            "skew": "long-tail"
          },
          "new_values": {
            "kind": "enum",
            "values": [
              "approved",
              "closed",
              "paid",
              "overdue",
              "resolved"
            ]
          },
          "old_values": {
            "kind": "enum",
            "values": [
              "pending",
              "active",
              "scheduled",
              "under_review",
              "open"
            ],
            "nullable": true,
            "nullRate": 0.35
          },
          "record_id": {
            "kind": "int",
            "min": 1,
            "max": 100000
          },
          "target_table": {
            "kind": "enum",
            "values": [
              "loan_applications",
              "active_loans",
              "payments",
              "repayment_schedules",
              "customers",
              "collaterals"
            ],
            "weights": [
              24,
              18,
              26,
              18,
              10,
              4
            ]
          },
          "timestamp": {
            "kind": "datetime",
            "from": "2020-01-01",
            "to": "2025-12-31",
            "dayProfile": "business"
          }
        }
      },
      "branch_targets": {
        "description": "Rows for the branch_targets table.",
        "rows": 10,
        "columns": {
          "id": {
            "kind": "pk"
          },
          "branch_id": {
            "kind": "fk",
            "ref": "branches.id",
            "skew": "long-tail"
          },
          "collection_target": {
            "kind": "decimal",
            "min": 150000,
            "max": 4000000,
            "scale": 2,
            "distribution": "long-tail"
          },
          "disbursement_target": {
            "kind": "decimal",
            "min": 250000,
            "max": 6000000,
            "scale": 2,
            "distribution": "long-tail"
          },
          "target_month": {
            "kind": "int",
            "min": 1,
            "max": 12
          },
          "target_year": {
            "kind": "int",
            "min": 2021,
            "max": 2025
          }
        }
      },
      "branches": {
        "description": "Rows for the branches table.",
        "rows": 25,
        "columns": {
          "id": {
            "kind": "pk"
          },
          "city": {
            "kind": "place.city"
          },
          "code": {
            "kind": "pattern",
            "pattern": "BR-###",
            "unique": true
          },
          "name": {
            "kind": "place.city"
          },
          "phone": {
            "kind": "place.phone"
          },
          "postal_code": {
            "kind": "place.postcode"
          },
          "state": {
            "kind": "place.regionCode"
          }
        }
      },
      "collateral_types": {
        "description": "Rows for the collateral_types table.",
        "rows": 8,
        "columns": {
          "id": {
            "kind": "pk"
          },
          "description": {
            "kind": "sentence"
          },
          "name": {
            "kind": "enum",
            "values": [
              "real_estate",
              "vehicle",
              "equipment",
              "inventory",
              "savings_deposit",
              "securities",
              "gold",
              "receivables"
            ],
            "unique": true
          }
        }
      },
      "collaterals": {
        "description": "Rows for the collaterals table.",
        "rows": 16,
        "columns": {
          "id": {
            "kind": "pk"
          },
          "application_id": {
            "kind": "fk",
            "ref": "loan_applications.id",
            "skew": "long-tail"
          },
          "collateral_type_id": {
            "kind": "fk",
            "ref": "collateral_types.id",
            "skew": "long-tail"
          },
          "description": {
            "kind": "sentence"
          },
          "estimated_value": {
            "kind": "decimal",
            "min": 2000,
            "max": 900000,
            "scale": 2,
            "distribution": "long-tail"
          },
          "valuation_date": {
            "kind": "date",
            "after": "application_id.application_date",
            "withinDays": 30
          },
          "valuer_name": {
            "kind": "person.fullName"
          },
          "verification_status": {
            "kind": "enum",
            "values": [
              "pending",
              "verified",
              "rejected"
            ],
            "weights": [
              10,
              84,
              6
            ]
          }
        }
      },
      "collections": {
        "description": "Rows for the collections table.",
        "rows": 10,
        "columns": {
          "id": {
            "kind": "pk"
          },
          "collector_id": {
            "kind": "fk",
            "ref": "employees.id",
            "skew": "long-tail"
          },
          "contact_date": {
            "kind": "datetime",
            "after": "delinquency_id.last_checked_date",
            "withinSeconds": 1209600,
            "dayProfile": "business"
          },
          "contact_method": {
            "kind": "enum",
            "values": [
              "phone",
              "sms",
              "email",
              "letter",
              "field_visit"
            ],
            "weights": [
              44,
              22,
              18,
              10,
              6
            ]
          },
          "delinquency_id": {
            "kind": "fk",
            "ref": "delinquencies.id",
            "skew": "long-tail"
          },
          "outcome_notes": {
            "kind": "sentence"
          },
          "promise_amount": {
            "kind": "decimal",
            "min": 50,
            "max": 5000,
            "scale": 2,
            "distribution": "long-tail"
          },
          "promise_to_pay_date": {
            "kind": "date",
            "after": "contact_date",
            "withinDays": 30
          }
        }
      },
      "credit_scores": {
        "description": "Rows for the credit_scores table.",
        "rows": 30,
        "columns": {
          "id": {
            "kind": "pk"
          },
          "customer_id": {
            "kind": "fk",
            "ref": "customers.id",
            "skew": "long-tail"
          },
          "evaluation_date": {
            "kind": "date",
            "from": "2019-06-01",
            "to": "2023-12-31"
          },
          "provider": {
            "kind": "enum",
            "values": [
              "bureau_north",
              "bureau_central",
              "bureau_coastal"
            ]
          },
          "risk_rating": {
            "kind": "enum",
            "values": [
              "low",
              "medium",
              "high",
              "very_high"
            ],
            "weights": [
              38,
              37,
              18,
              7
            ]
          },
          "score": {
            "kind": "int",
            "min": 300,
            "max": 850,
            "distribution": "normal"
          }
        }
      },
      "customer_references": {
        "description": "Rows for the customer_references table.",
        "rows": 19,
        "columns": {
          "id": {
            "kind": "pk"
          },
          "customer_id": {
            "kind": "fk",
            "ref": "customers.id",
            "skew": "long-tail"
          },
          "email": {
            "kind": "internet.email"
          },
          "full_name": {
            "kind": "person.fullName"
          },
          "phone": {
            "kind": "phone.number"
          },
          "relationship": {
            "kind": "enum",
            "values": [
              "family",
              "friend",
              "employer",
              "colleague",
              "landlord"
            ],
            "weights": [
              40,
              30,
              12,
              12,
              6
            ]
          }
        }
      },
      "customers": {
        "description": "Rows for the customers table.",
        "rows": 22,
        "columns": {
          "id": {
            "kind": "pk"
          },
          "address": {
            "kind": "location.streetAddress"
          },
          "city": {
            "kind": "place.city"
          },
          "date_of_birth": {
            "kind": "date",
            "from": "1950-01-01",
            "to": "2004-12-31"
          },
          "email": {
            "kind": "internet.email",
            "from": {
              "firstName": "first_name",
              "lastName": "last_name"
            }
          },
          "employment_status": {
            "kind": "enum",
            "values": [
              "employed",
              "self_employed",
              "retired",
              "unemployed",
              "student"
            ],
            "weights": [
              68,
              14,
              10,
              5,
              3
            ]
          },
          "first_name": {
            "kind": "person.firstName"
          },
          "last_name": {
            "kind": "person.lastName"
          },
          "monthly_income": {
            "kind": "decimal",
            "min": 900,
            "max": 40000,
            "scale": 2,
            "distribution": "long-tail"
          },
          "national_id": {
            "kind": "pattern",
            "pattern": "CUS-########",
            "unique": true
          },
          "phone": {
            "kind": "phone.number"
          },
          "postal_code": {
            "kind": "place.postcode"
          },
          "state": {
            "kind": "place.regionCode"
          }
        }
      },
      "delinquencies": {
        "description": "Rows for the delinquencies table.",
        "rows": 10,
        "columns": {
          "id": {
            "kind": "pk"
          },
          "days_past_due": {
            "kind": "int",
            "min": 1,
            "max": 365,
            "distribution": "long-tail"
          },
          "last_checked_date": {
            "kind": "datetime",
            "after": "loan_id.start_date",
            "withinDays": 700
          },
          "loan_id": {
            "kind": "fk",
            "ref": "active_loans.id",
            "skew": "long-tail"
          },
          "overdue_interest": {
            "kind": "decimal",
            "min": 1,
            "max": 9000,
            "scale": 2,
            "distribution": "long-tail"
          },
          "overdue_principal": {
            "kind": "decimal",
            "min": 20,
            "max": 60000,
            "scale": 2,
            "distribution": "long-tail"
          },
          "status": {
            "kind": "enum",
            "values": [
              "open",
              "in_collection",
              "legal",
              "resolved"
            ],
            "weights": [
              32,
              30,
              6,
              32
            ]
          }
        }
      },
      "departments": {
        "description": "Rows for the departments table.",
        "rows": 8,
        "columns": {
          "id": {
            "kind": "pk"
          },
          "code": {
            "kind": "pattern",
            "pattern": "DPT-##",
            "unique": true
          },
          "cost_center": {
            "kind": "pattern",
            "pattern": "CC-####"
          },
          "name": {
            "kind": "enum",
            "values": [
              "lending",
              "underwriting",
              "collections",
              "operations",
              "compliance",
              "customer_service",
              "finance",
              "legal"
            ],
            "unique": true
          }
        }
      },
      "disbursements": {
        "description": "Rows for the disbursements table.",
        "rows": 25,
        "columns": {
          "id": {
            "kind": "pk"
          },
          "account_number": {
            "kind": "pattern",
            "pattern": "##########"
          },
          "amount": {
            "kind": "decimal",
            "min": 1000,
            "max": 400000,
            "scale": 2,
            "distribution": "long-tail"
          },
          "approved_by": {
            "kind": "fk",
            "ref": "employees.id",
            "skew": "long-tail"
          },
          "bank_name": {
            "kind": "company.name"
          },
          "disbursement_date": {
            "kind": "date",
            "after": "loan_id.start_date",
            "withinDays": 7
          },
          "loan_id": {
            "kind": "fk",
            "ref": "active_loans.id",
            "skew": "long-tail"
          },
          "transaction_reference": {
            "kind": "pattern",
            "pattern": "DSB-##########",
            "unique": true
          }
        }
      },
      "employees": {
        "description": "Rows for the employees table.",
        "rows": 10,
        "columns": {
          "id": {
            "kind": "pk"
          },
          "branch_id": {
            "kind": "fk",
            "ref": "branches.id",
            "skew": "long-tail"
          },
          "department_id": {
            "kind": "fk",
            "ref": "departments.id",
            "skew": "long-tail"
          },
          "email": {
            "kind": "internet.email",
            "from": {
              "firstName": "first_name",
              "lastName": "last_name"
            }
          },
          "first_name": {
            "kind": "person.firstName"
          },
          "hire_date": {
            "kind": "date",
            "from": "2008-01-01",
            "to": "2023-12-31"
          },
          "job_title": {
            "kind": "enum",
            "values": [
              "loan_officer",
              "credit_analyst",
              "underwriter",
              "collector",
              "branch_manager",
              "teller"
            ],
            "weights": [
              30,
              15,
              12,
              18,
              5,
              20
            ]
          },
          "last_name": {
            "kind": "person.lastName"
          },
          "phone": {
            "kind": "phone.number"
          }
        }
      },
      "fee_types": {
        "description": "Rows for the fee_types table.",
        "rows": 8,
        "columns": {
          "id": {
            "kind": "pk"
          },
          "amount_type": {
            "kind": "enum",
            "values": [
              "fixed",
              "percent"
            ],
            "weights": [
              70,
              30
            ]
          },
          "code": {
            "kind": "pattern",
            "pattern": "FEE-##",
            "unique": true
          },
          "name": {
            "kind": "enum",
            "values": [
              "origination",
              "late_payment",
              "processing",
              "prepayment",
              "documentation",
              "insurance",
              "valuation",
              "legal"
            ],
            "unique": true
          },
          "rate_or_value": {
            "kind": "decimal",
            "min": 0.5,
            "max": 250,
            "scale": 2
          }
        }
      },
      "guarantors": {
        "description": "Rows for the guarantors table.",
        "rows": 10,
        "columns": {
          "id": {
            "kind": "pk"
          },
          "annual_income": {
            "kind": "decimal",
            "min": 18000,
            "max": 450000,
            "scale": 2,
            "distribution": "long-tail"
          },
          "application_id": {
            "kind": "fk",
            "ref": "loan_applications.id",
            "skew": "long-tail"
          },
          "email": {
            "kind": "internet.email",
            "from": {
              "firstName": "first_name",
              "lastName": "last_name"
            }
          },
          "first_name": {
            "kind": "person.firstName"
          },
          "last_name": {
            "kind": "person.lastName"
          },
          "national_id": {
            "kind": "pattern",
            "pattern": "[GUA]-########",
            "unique": true
          },
          "phone": {
            "kind": "phone.number"
          },
          "relationship": {
            "kind": "enum",
            "values": [
              "spouse",
              "parent",
              "sibling",
              "friend",
              "business_partner"
            ],
            "weights": [
              34,
              28,
              16,
              12,
              10
            ]
          }
        }
      },
      "insurance_policies": {
        "description": "Rows for the insurance_policies table.",
        "rows": 13,
        "columns": {
          "id": {
            "kind": "pk"
          },
          "coverage_amount": {
            "kind": "decimal",
            "min": 1000,
            "max": 400000,
            "scale": 2,
            "distribution": "long-tail"
          },
          "end_date": {
            "kind": "date",
            "after": "start_date",
            "withinDays": 2500
          },
          "loan_id": {
            "kind": "fk",
            "ref": "active_loans.id",
            "skew": "long-tail"
          },
          "policy_number": {
            "kind": "pattern",
            "pattern": "POL-##########",
            "unique": true
          },
          "premium_amount": {
            "kind": "decimal",
            "min": 40,
            "max": 2500,
            "scale": 2,
            "distribution": "long-tail"
          },
          "provider_name": {
            "kind": "company.name"
          },
          "start_date": {
            "kind": "date",
            "after": "loan_id.start_date",
            "withinDays": 30
          }
        }
      },
      "legal_actions": {
        "description": "Rows for the legal_actions table.",
        "rows": 10,
        "columns": {
          "id": {
            "kind": "pk"
          },
          "action_type": {
            "kind": "enum",
            "values": [
              "demand_letter",
              "lawsuit",
              "judgment",
              "settlement",
              "repossession"
            ],
            "weights": [
              40,
              25,
              12,
              15,
              8
            ]
          },
          "case_number": {
            "kind": "pattern",
            "pattern": "CV-####-######",
            "unique": true
          },
          "court_name": {
            "kind": "enum",
            "values": [
              "Circuit Court",
              "District Court",
              "County Court",
              "Superior Court",
              "Small Claims Court"
            ],
            "weights": [
              30,
              25,
              20,
              10,
              15
            ]
          },
          "current_status": {
            "kind": "enum",
            "values": [
              "filed",
              "in_progress",
              "judgment_entered",
              "settled",
              "dismissed"
            ],
            "weights": [
              22,
              30,
              18,
              20,
              10
            ]
          },
          "expense_incurred": {
            "kind": "decimal",
            "min": 150,
            "max": 25000,
            "scale": 2,
            "distribution": "long-tail"
          },
          "filing_date": {
            "kind": "date",
            "after": "loan_id.start_date",
            "withinDays": 700
          },
          "loan_id": {
            "kind": "fk",
            "ref": "active_loans.id",
            "skew": "long-tail"
          }
        }
      },
      "loan_applications": {
        "description": "Rows for the loan_applications table.",
        "rows": 38,
        "columns": {
          "id": {
            "kind": "pk"
          },
          "application_date": {
            "kind": "date",
            "from": "2020-01-01",
            "to": "2023-12-31",
            "trend": "growing"
          },
          "assigned_officer_id": {
            "kind": "fk",
            "ref": "employees.id",
            "skew": "long-tail"
          },
          "branch_id": {
            "kind": "fk",
            "ref": "branches.id",
            "skew": "long-tail"
          },
          "customer_id": {
            "kind": "fk",
            "ref": "customers.id",
            "skew": "long-tail"
          },
          "loan_product_id": {
            "kind": "fk",
            "ref": "loan_products.id",
            "skew": "long-tail"
          },
          "requested_amount": {
            "kind": "decimal",
            "min": 1000,
            "max": 400000,
            "scale": 2,
            "distribution": "long-tail"
          },
          "requested_term_months": {
            "kind": "int",
            "min": 6,
            "max": 84
          },
          "status": {
            "kind": "enum",
            "values": [
              "submitted",
              "under_review",
              "approved",
              "rejected",
              "withdrawn"
            ],
            "weights": [
              6,
              8,
              64,
              17,
              5
            ]
          }
        }
      },
      "loan_fees": {
        "description": "Rows for the loan_fees table.",
        "rows": 38,
        "columns": {
          "id": {
            "kind": "pk"
          },
          "amount_charged": {
            "kind": "decimal",
            "min": 5,
            "max": 2500,
            "scale": 2,
            "distribution": "long-tail"
          },
          "charge_date": {
            "kind": "date",
            "after": "loan_id.start_date",
            "withinDays": 700
          },
          "fee_type_id": {
            "kind": "fk",
            "ref": "fee_types.id",
            "skew": "long-tail"
          },
          "is_paid": {
            "kind": "bool"
          },
          "loan_id": {
            "kind": "fk",
            "ref": "active_loans.id",
            "skew": "long-tail"
          }
        }
      },
      "loan_products": {
        "description": "Rows for the loan_products table.",
        "rows": 12,
        "columns": {
          "id": {
            "kind": "pk"
          },
          "code": {
            "kind": "pattern",
            "pattern": "LP-###",
            "unique": true
          },
          "description": {
            "kind": "sentence"
          },
          "interest_rate": {
            "kind": "decimal",
            "min": 3.5,
            "max": 24,
            "scale": 2
          },
          "interest_type": {
            "kind": "enum",
            "values": [
              "fixed",
              "variable"
            ],
            "weights": [
              72,
              28
            ]
          },
          "maximum_amount": {
            "kind": "decimal",
            "min": 25000,
            "max": 750000,
            "scale": 2
          },
          "maximum_term_months": {
            "kind": "int",
            "min": 36,
            "max": 360
          },
          "minimum_amount": {
            "kind": "decimal",
            "min": 500,
            "max": 10000,
            "scale": 2
          },
          "minimum_term_months": {
            "kind": "int",
            "min": 6,
            "max": 24
          },
          "name": {
            "kind": "enum",
            "values": [
              "personal_loan",
              "auto_loan",
              "home_equity",
              "small_business",
              "student_refinance",
              "debt_consolidation",
              "mortgage_15_year",
              "mortgage_30_year",
              "equipment_finance",
              "credit_builder",
              "bridge_loan",
              "green_home_improvement"
            ],
            "unique": true
          }
        }
      },
      "loan_reschedules": {
        "description": "Rows for the loan_reschedules table.",
        "rows": 10,
        "columns": {
          "id": {
            "kind": "pk"
          },
          "approval_date": {
            "kind": "date",
            "after": "request_date",
            "withinDays": 21
          },
          "approved_by": {
            "kind": "fk",
            "ref": "employees.id",
            "skew": "long-tail"
          },
          "loan_id": {
            "kind": "fk",
            "ref": "active_loans.id",
            "skew": "long-tail"
          },
          "new_interest_rate": {
            "kind": "decimal",
            "min": 2.5,
            "max": 20,
            "scale": 2
          },
          "new_term_months": {
            "kind": "int",
            "min": 12,
            "max": 120
          },
          "reason": {
            "kind": "sentence"
          },
          "request_date": {
            "kind": "date",
            "after": "loan_id.start_date",
            "withinDays": 700
          }
        }
      },
      "payment_allocations": {
        "description": "Rows for the payment_allocations table.",
        "rows": 1000,
        "columns": {
          "id": {
            "kind": "pk"
          },
          "fees_paid": {
            "kind": "decimal",
            "min": 0,
            "max": 35,
            "scale": 2
          },
          "interest_paid": {
            "kind": "decimal",
            "min": 0,
            "max": 1500,
            "scale": 2,
            "distribution": "long-tail"
          },
          "payment_id": {
            "kind": "fk",
            "ref": "payments.id",
            "skew": "long-tail"
          },
          "penalty_paid": {
            "kind": "decimal",
            "min": 0,
            "max": 120,
            "scale": 2
          },
          "principal_paid": {
            "kind": "decimal",
            "min": 10,
            "max": 6000,
            "scale": 2,
            "distribution": "long-tail"
          },
          "schedule_id": {
            "kind": "fk",
            "ref": "repayment_schedules.id",
            "skew": "long-tail"
          }
        }
      },
      "payment_methods": {
        "description": "Rows for the payment_methods table.",
        "rows": 6,
        "columns": {
          "id": {
            "kind": "pk"
          },
          "code": {
            "kind": "pattern",
            "pattern": "PM-##",
            "unique": true
          },
          "is_active": {
            "kind": "bool"
          },
          "name": {
            "kind": "enum",
            "values": [
              "bank_transfer",
              "direct_debit",
              "debit_card",
              "credit_card",
              "cash",
              "check"
            ],
            "unique": true
          }
        }
      },
      "payments": {
        "description": "Rows for the payments table.",
        "rows": 500,
        "columns": {
          "id": {
            "kind": "pk"
          },
          "amount_paid": {
            "kind": "decimal",
            "min": 20,
            "max": 8000,
            "scale": 2,
            "distribution": "long-tail"
          },
          "collected_by": {
            "kind": "fk",
            "ref": "employees.id",
            "skew": "long-tail"
          },
          "loan_id": {
            "kind": "fk",
            "ref": "active_loans.id",
            "skew": "long-tail"
          },
          "payment_date": {
            "kind": "datetime",
            "after": "loan_id.start_date",
            "withinDays": 700,
            "dayProfile": "business"
          },
          "payment_method_id": {
            "kind": "fk",
            "ref": "payment_methods.id",
            "skew": "long-tail"
          },
          "transaction_reference": {
            "kind": "pattern",
            "pattern": "[PAY]-############",
            "unique": true
          }
        }
      },
      "penalties": {
        "description": "Rows for the penalties table.",
        "rows": 25,
        "columns": {
          "id": {
            "kind": "pk"
          },
          "amount_charged": {
            "kind": "decimal",
            "min": 10,
            "max": 500,
            "scale": 2,
            "distribution": "long-tail"
          },
          "charge_date": {
            "kind": "date",
            "after": "loan_id.start_date",
            "withinDays": 700
          },
          "is_paid": {
            "kind": "bool"
          },
          "loan_id": {
            "kind": "fk",
            "ref": "active_loans.id",
            "skew": "long-tail"
          },
          "reason": {
            "kind": "sentence"
          },
          "schedule_id": {
            "kind": "fk",
            "ref": "repayment_schedules.id",
            "skew": "long-tail"
          }
        }
      },
      "repayment_schedules": {
        "description": "Rows for the repayment_schedules table.",
        "rows": 500,
        "columns": {
          "id": {
            "kind": "pk"
          },
          "due_date": {
            "kind": "date",
            "after": "loan_id.start_date",
            "withinDays": 2500
          },
          "fees_due": {
            "kind": "decimal",
            "min": 0,
            "max": 35,
            "scale": 2
          },
          "installment_number": {
            "kind": "int",
            "min": 1,
            "max": 84
          },
          "interest_due": {
            "kind": "decimal",
            "min": 1,
            "max": 1500,
            "scale": 2,
            "distribution": "long-tail"
          },
          "loan_id": {
            "kind": "fk",
            "ref": "active_loans.id",
            "skew": "long-tail"
          },
          "principal_due": {
            "kind": "decimal",
            "min": 20,
            "max": 6000,
            "scale": 2,
            "distribution": "long-tail"
          },
          "status": {
            "kind": "enum",
            "values": [
              "scheduled",
              "paid",
              "partially_paid",
              "overdue",
              "waived"
            ],
            "weights": [
              38,
              50,
              5,
              6,
              1
            ]
          },
          "total_due": {
            "kind": "expr",
            "op": "sum",
            "of": [
              "principal_due",
              "interest_due"
            ],
            "scale": 2
          }
        }
      },
      "write_offs": {
        "description": "Rows for the write_offs table.",
        "rows": 10,
        "columns": {
          "id": {
            "kind": "pk"
          },
          "approved_by": {
            "kind": "fk",
            "ref": "employees.id",
            "skew": "long-tail"
          },
          "interest_written_off": {
            "kind": "decimal",
            "min": 10,
            "max": 40000,
            "scale": 2,
            "distribution": "long-tail"
          },
          "loan_id": {
            "kind": "fk",
            "ref": "active_loans.id",
            "skew": "long-tail"
          },
          "principal_written_off": {
            "kind": "decimal",
            "min": 100,
            "max": 250000,
            "scale": 2,
            "distribution": "long-tail"
          },
          "reason": {
            "kind": "sentence"
          },
          "write_off_date": {
            "kind": "date",
            "after": "loan_id.start_date",
            "withinDays": 700
          }
        }
      }
    }
  },
  "counts": {
    "branches": 25,
    "branch_targets": 10,
    "collateral_types": 8,
    "customers": 22,
    "credit_scores": 30,
    "customer_references": 19,
    "departments": 8,
    "employees": 10,
    "audit_logs": 30,
    "fee_types": 8,
    "loan_products": 12,
    "loan_applications": 38,
    "active_loans": 25,
    "application_documents": 80,
    "application_reviews": 38,
    "collaterals": 16,
    "delinquencies": 10,
    "collections": 10,
    "disbursements": 25,
    "guarantors": 10,
    "insurance_policies": 13,
    "legal_actions": 10,
    "loan_fees": 38,
    "loan_reschedules": 10,
    "payment_methods": 6,
    "payments": 500,
    "repayment_schedules": 500,
    "payment_allocations": 1000,
    "penalties": 25,
    "write_offs": 10
  },
  "artifacts": [
    {
      "file": "csv/branches.csv",
      "format": "csv",
      "table": "branches",
      "key": "datasets/loan-management-sample-database/v1/csv/branches.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/loan-management-sample-database/v1/csv/branches.csv",
      "bytes": 1397,
      "sha256": "5f866a1e728919b9ed7a3dba930783f1c91529ce1f42b69b4c2e84a6267481b0",
      "rows": 25,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/branch_targets.csv",
      "format": "csv",
      "table": "branch_targets",
      "key": "datasets/loan-management-sample-database/v1/csv/branch_targets.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/loan-management-sample-database/v1/csv/branch_targets.csv",
      "bytes": 414,
      "sha256": "0ffe4b0cb38ec2c477f8032c1b091a2adb6597e5636a486a2c31989924259728",
      "rows": 10,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/collateral_types.csv",
      "format": "csv",
      "table": "collateral_types",
      "key": "datasets/loan-management-sample-database/v1/csv/collateral_types.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/loan-management-sample-database/v1/csv/collateral_types.csv",
      "bytes": 577,
      "sha256": "42b0e68bfaf77e9a281d14b96c2496ee25a366baa2c5cebfe083db0e58dfe9fa",
      "rows": 8,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/customers.csv",
      "format": "csv",
      "table": "customers",
      "key": "datasets/loan-management-sample-database/v1/csv/customers.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/loan-management-sample-database/v1/csv/customers.csv",
      "bytes": 3210,
      "sha256": "8e0e732f9df1479a990a5b90ea0e5f4ebc2f13c737d69c0d009d8d29127eda09",
      "rows": 22,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/credit_scores.csv",
      "format": "csv",
      "table": "credit_scores",
      "key": "datasets/loan-management-sample-database/v1/csv/credit_scores.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/loan-management-sample-database/v1/csv/credit_scores.csv",
      "bytes": 1298,
      "sha256": "390e5ac09954067d37ce171a4ae4739529d9353bc57b2788338e91fcf58d5788",
      "rows": 30,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/customer_references.csv",
      "format": "csv",
      "table": "customer_references",
      "key": "datasets/loan-management-sample-database/v1/csv/customer_references.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/loan-management-sample-database/v1/csv/customer_references.csv",
      "bytes": 1424,
      "sha256": "1a791b6d38822dc27bd75e247e46258caac6a99c594623c910a91fea1297e16c",
      "rows": 19,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/departments.csv",
      "format": "csv",
      "table": "departments",
      "key": "datasets/loan-management-sample-database/v1/csv/departments.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/loan-management-sample-database/v1/csv/departments.csv",
      "bytes": 256,
      "sha256": "09e86d7e8b5b498d1f71ba5066a45c65656390b599c17e68e56d01628a2ab60c",
      "rows": 8,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/employees.csv",
      "format": "csv",
      "table": "employees",
      "key": "datasets/loan-management-sample-database/v1/csv/employees.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/loan-management-sample-database/v1/csv/employees.csv",
      "bytes": 949,
      "sha256": "ef419667fb30bfe833c0cdee376a111ad9ac1a4eea826c6ff4ec33f26904f88d",
      "rows": 10,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/audit_logs.csv",
      "format": "csv",
      "table": "audit_logs",
      "key": "datasets/loan-management-sample-database/v1/csv/audit_logs.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/loan-management-sample-database/v1/csv/audit_logs.csv",
      "bytes": 2118,
      "sha256": "b958c6752b360f35d686b1a97673d3b37d1076946b5bbb65428ed9fdf86b2452",
      "rows": 30,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/fee_types.csv",
      "format": "csv",
      "table": "fee_types",
      "key": "datasets/loan-management-sample-database/v1/csv/fee_types.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/loan-management-sample-database/v1/csv/fee_types.csv",
      "bytes": 311,
      "sha256": "59cf19c7316ae22b23ee3cab37d6ab2756df9020ec49f9994a8d1002383f5a45",
      "rows": 8,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/loan_products.csv",
      "format": "csv",
      "table": "loan_products",
      "key": "datasets/loan-management-sample-database/v1/csv/loan_products.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/loan-management-sample-database/v1/csv/loan_products.csv",
      "bytes": 1581,
      "sha256": "0bf7f29697515c45b25c670d21834ebe581d8cbc7751194710aa8a6ff4a30b40",
      "rows": 12,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/loan_applications.csv",
      "format": "csv",
      "table": "loan_applications",
      "key": "datasets/loan-management-sample-database/v1/csv/loan_applications.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/loan-management-sample-database/v1/csv/loan_applications.csv",
      "bytes": 1862,
      "sha256": "db8641647750dafc364d1eaf267f00935869acb86daffcae50f2836524b30fc4",
      "rows": 38,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/active_loans.csv",
      "format": "csv",
      "table": "active_loans",
      "key": "datasets/loan-management-sample-database/v1/csv/active_loans.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/loan-management-sample-database/v1/csv/active_loans.csv",
      "bytes": 1679,
      "sha256": "291720a03449f2a9ccef90de920f22a92ce4e14c0f43eced26c73c1dcd1a0f0e",
      "rows": 25,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/application_documents.csv",
      "format": "csv",
      "table": "application_documents",
      "key": "datasets/loan-management-sample-database/v1/csv/application_documents.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/loan-management-sample-database/v1/csv/application_documents.csv",
      "bytes": 7667,
      "sha256": "680b33ae10c91839b7d894a6551d00e9d0361ec7e2ab8838a314ca35120571dd",
      "rows": 80,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/application_reviews.csv",
      "format": "csv",
      "table": "application_reviews",
      "key": "datasets/loan-management-sample-database/v1/csv/application_reviews.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/loan-management-sample-database/v1/csv/application_reviews.csv",
      "bytes": 3649,
      "sha256": "4d5a995831fb6ec6f99cedfd86411e4c622b94a2cf2960f6bbc747cee76e4c04",
      "rows": 38,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/collaterals.csv",
      "format": "csv",
      "table": "collaterals",
      "key": "datasets/loan-management-sample-database/v1/csv/collaterals.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/loan-management-sample-database/v1/csv/collaterals.csv",
      "bytes": 1899,
      "sha256": "9b1e294c4db988d2183bf72a181c4a969a76080f91368e98011f97a72d2a16de",
      "rows": 16,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/delinquencies.csv",
      "format": "csv",
      "table": "delinquencies",
      "key": "datasets/loan-management-sample-database/v1/csv/delinquencies.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/loan-management-sample-database/v1/csv/delinquencies.csv",
      "bytes": 640,
      "sha256": "1e0b303c553f61aa444bda36f5ca612af67bebbbff55c46e9767b071d0c0e60e",
      "rows": 10,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/collections.csv",
      "format": "csv",
      "table": "collections",
      "key": "datasets/loan-management-sample-database/v1/csv/collections.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/loan-management-sample-database/v1/csv/collections.csv",
      "bytes": 1198,
      "sha256": "2f6bdff6b33abf5c70b478533436f8e06ec9bb2a44b4030ee5315aab7d82e2ea",
      "rows": 10,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/disbursements.csv",
      "format": "csv",
      "table": "disbursements",
      "key": "datasets/loan-management-sample-database/v1/csv/disbursements.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/loan-management-sample-database/v1/csv/disbursements.csv",
      "bytes": 2016,
      "sha256": "ec88f24ffc61a3736bcdd5ccbb94484532fc68bf26700922a66bc8655038ecfd",
      "rows": 25,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/guarantors.csv",
      "format": "csv",
      "table": "guarantors",
      "key": "datasets/loan-management-sample-database/v1/csv/guarantors.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/loan-management-sample-database/v1/csv/guarantors.csv",
      "bytes": 1060,
      "sha256": "e6a77fb385a33932d638c704b6815749f933e275239f41e3f98a7e626ba605a9",
      "rows": 10,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/insurance_policies.csv",
      "format": "csv",
      "table": "insurance_policies",
      "key": "datasets/loan-management-sample-database/v1/csv/insurance_policies.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/loan-management-sample-database/v1/csv/insurance_policies.csv",
      "bytes": 1074,
      "sha256": "c113f57a9c5ff0085250e6dc586d0cc7b12d815297f39d5c6d532633c2783947",
      "rows": 13,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/legal_actions.csv",
      "format": "csv",
      "table": "legal_actions",
      "key": "datasets/loan-management-sample-database/v1/csv/legal_actions.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/loan-management-sample-database/v1/csv/legal_actions.csv",
      "bytes": 845,
      "sha256": "73ce8568cd1f438d0dccfd982e055cf9a977539636031c9ba8fbb98bf43a1ffe",
      "rows": 10,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/loan_fees.csv",
      "format": "csv",
      "table": "loan_fees",
      "key": "datasets/loan-management-sample-database/v1/csv/loan_fees.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/loan-management-sample-database/v1/csv/loan_fees.csv",
      "bytes": 1272,
      "sha256": "3d29b942dd9a2d5a2597361ca8d85276a8a0788580ebf564de4c5491bf75fbfc",
      "rows": 38,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/loan_reschedules.csv",
      "format": "csv",
      "table": "loan_reschedules",
      "key": "datasets/loan-management-sample-database/v1/csv/loan_reschedules.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/loan-management-sample-database/v1/csv/loan_reschedules.csv",
      "bytes": 1009,
      "sha256": "993a516ab7fa4d5df9c36bb5df32ffd58ff42ed5dbd95324e477dd2524f59115",
      "rows": 10,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/payment_methods.csv",
      "format": "csv",
      "table": "payment_methods",
      "key": "datasets/loan-management-sample-database/v1/csv/payment_methods.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/loan-management-sample-database/v1/csv/payment_methods.csv",
      "bytes": 171,
      "sha256": "a2c901b7356e602d5ec41a2f7ea69573bebd5dbea3133f5cc833a342b1d7cc2b",
      "rows": 6,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/payments.csv",
      "format": "csv",
      "table": "payments",
      "key": "datasets/loan-management-sample-database/v1/csv/payments.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/loan-management-sample-database/v1/csv/payments.csv",
      "bytes": 27987,
      "sha256": "365f488c4f3f3d5306677bbe2484db92026ea3222d795f3d37747813c7ce9488",
      "rows": 500,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/repayment_schedules.csv",
      "format": "csv",
      "table": "repayment_schedules",
      "key": "datasets/loan-management-sample-database/v1/csv/repayment_schedules.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/loan-management-sample-database/v1/csv/repayment_schedules.csv",
      "bytes": 28392,
      "sha256": "6bf2ccd154baa5c23ced4fbc0533f1484e4644464d9b76f7626d850cf1d81084",
      "rows": 500,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/payment_allocations.csv",
      "format": "csv",
      "table": "payment_allocations",
      "key": "datasets/loan-management-sample-database/v1/csv/payment_allocations.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/loan-management-sample-database/v1/csv/payment_allocations.csv",
      "bytes": 37921,
      "sha256": "eaa0c99c02a9afa800c02661cfc2a7b8b0060cae6cfd0f23c8fc312a8639f194",
      "rows": 1000,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/penalties.csv",
      "format": "csv",
      "table": "penalties",
      "key": "datasets/loan-management-sample-database/v1/csv/penalties.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/loan-management-sample-database/v1/csv/penalties.csv",
      "bytes": 2318,
      "sha256": "c1afe3c48a6d7287a63e76f1de96e6e08c22ef8eb815c977a27add033556be1c",
      "rows": 25,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/write_offs.csv",
      "format": "csv",
      "table": "write_offs",
      "key": "datasets/loan-management-sample-database/v1/csv/write_offs.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/loan-management-sample-database/v1/csv/write_offs.csv",
      "bytes": 1031,
      "sha256": "c2309d09c3a2ca7c2d5560477dbd8114b30fab972313c420ee69ea2c7efaa12c",
      "rows": 10,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "loan-management-sample-database.json",
      "format": "json",
      "table": null,
      "key": "datasets/loan-management-sample-database/v1/loan-management-sample-database.json",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/loan-management-sample-database/v1/loan-management-sample-database.json",
      "bytes": 577044,
      "sha256": "65c214f839f9ae3b4ee597f19a6463ae23eff4f88e2a67c4381ff63acc3e4e84",
      "rows": null,
      "contentType": "application/json; charset=utf-8"
    },
    {
      "file": "sql/postgres.sql",
      "format": "sql-postgres",
      "table": null,
      "key": "datasets/loan-management-sample-database/v1/sql/postgres.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/loan-management-sample-database/v1/sql/postgres.sql",
      "bytes": 199957,
      "sha256": "3845737c015a09126d055efbb76264bfeb08f513f663ec5e8a5580052936db93",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "sql/mysql.sql",
      "format": "sql-mysql",
      "table": null,
      "key": "datasets/loan-management-sample-database/v1/sql/mysql.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/loan-management-sample-database/v1/sql/mysql.sql",
      "bytes": 196672,
      "sha256": "cdd773001a80b161ce8e24b88dd6b9bc23c5be3c24681f757c6fd2bb07ea7e0e",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "sql/mssql.sql",
      "format": "sql-mssql",
      "table": null,
      "key": "datasets/loan-management-sample-database/v1/sql/mssql.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/loan-management-sample-database/v1/sql/mssql.sql",
      "bytes": 202331,
      "sha256": "c9a91e55ea4bae824a6644fc42921526e67b587390850af8f2e1e7eb28dcdc60",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "sql/sqlite.sql",
      "format": "sql-sqlite",
      "table": null,
      "key": "datasets/loan-management-sample-database/v1/sql/sqlite.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/loan-management-sample-database/v1/sql/sqlite.sql",
      "bytes": 193688,
      "sha256": "014fea5afcb49dc795ec3ae75ac5aa9ac5c7a6f5caeb0f8c55f0b9231bb581fc",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "prisma/seed.ts",
      "format": "prisma-seed",
      "table": null,
      "key": "datasets/loan-management-sample-database/v1/prisma/seed.ts",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/loan-management-sample-database/v1/prisma/seed.ts",
      "bytes": 457984,
      "sha256": "ca8fc5602578d6caa15e157ba3bf8ab3f4486b0571c68852c16cc68a31c39de0",
      "rows": null,
      "contentType": "application/typescript; charset=utf-8"
    },
    {
      "file": "django/fixtures.json",
      "format": "django-fixture",
      "table": null,
      "key": "datasets/loan-management-sample-database/v1/django/fixtures.json",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/loan-management-sample-database/v1/django/fixtures.json",
      "bytes": 708451,
      "sha256": "8577d612bc4aa8174bbcc8e8ad81cf99a9e3c8af473870d96dfb3384bdeecf81",
      "rows": null,
      "contentType": "application/json; charset=utf-8"
    }
  ],
  "flagship": {
    "sizes": {
      "1k": {
        "rows": 2546,
        "counts": {
          "branches": 25,
          "branch_targets": 10,
          "collateral_types": 8,
          "customers": 22,
          "credit_scores": 30,
          "customer_references": 19,
          "departments": 8,
          "employees": 10,
          "audit_logs": 30,
          "fee_types": 8,
          "loan_products": 12,
          "loan_applications": 38,
          "active_loans": 25,
          "application_documents": 80,
          "application_reviews": 38,
          "collaterals": 16,
          "delinquencies": 10,
          "collections": 10,
          "disbursements": 25,
          "guarantors": 10,
          "insurance_policies": 13,
          "legal_actions": 10,
          "loan_fees": 38,
          "loan_reschedules": 10,
          "payment_methods": 6,
          "payments": 500,
          "repayment_schedules": 500,
          "payment_allocations": 1000,
          "penalties": 25,
          "write_offs": 10
        },
        "notes": [],
        "downloads": [
          {
            "format": "sql-postgres",
            "label": "PostgreSQL",
            "file": "flagship/1k/postgres.sql.gz",
            "key": "datasets/loan-management-sample-database/v1/flagship/1k/postgres.sql.gz",
            "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/loan-management-sample-database/v1/flagship/1k/postgres.sql.gz",
            "bytes": 65312,
            "sha256": "8140ba4410e8cf42a31ff6478964f9d8b874afec91d201a74dadf1be1a48a993",
            "raw": {
              "bytes": 208153,
              "sha256": "eb0107afebb242b81b12c9832d98133a58a48b92da7c8e6f43ad63521325e638"
            },
            "contentType": "application/gzip"
          },
          {
            "format": "sql-mysql",
            "label": "MySQL",
            "file": "flagship/1k/mysql.sql.gz",
            "key": "datasets/loan-management-sample-database/v1/flagship/1k/mysql.sql.gz",
            "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/loan-management-sample-database/v1/flagship/1k/mysql.sql.gz",
            "bytes": 64607,
            "sha256": "cba551a9b4d7e7047c93a4b055ebfa847da53f8480d3b50f32ea43dd814d08d4",
            "raw": {
              "bytes": 204868,
              "sha256": "f7c49fbeebcdc421bd76ca1cea88ce8a9000e1d57c137ee7a3c173d014bd9a2c"
            },
            "contentType": "application/gzip"
          },
          {
            "format": "sql-sqlite",
            "label": "SQLite",
            "file": "flagship/1k/sqlite.sql.gz",
            "key": "datasets/loan-management-sample-database/v1/flagship/1k/sqlite.sql.gz",
            "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/loan-management-sample-database/v1/flagship/1k/sqlite.sql.gz",
            "bytes": 63868,
            "sha256": "5326cc66a4ec08c74911533f1f818f79e47a939f44e7329e58fd140a24daa867",
            "raw": {
              "bytes": 201884,
              "sha256": "ea2261ada9cba4d9a0a66dae847b9bede49e61cb6eff818321994005be1e8734"
            },
            "contentType": "application/gzip"
          },
          {
            "format": "csv",
            "label": "CSV",
            "file": "flagship/1k/csv.zip",
            "key": "datasets/loan-management-sample-database/v1/flagship/1k/csv.zip",
            "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/loan-management-sample-database/v1/flagship/1k/csv.zip",
            "bytes": 66869,
            "sha256": "b4cfe8a04eb86845dc80fe1acc605ee7919657ffe453d6acd9bc2bf46fead79f",
            "tables": {
              "active_loans": {
                "bytes": 1679,
                "sha256": "291720a03449f2a9ccef90de920f22a92ce4e14c0f43eced26c73c1dcd1a0f0e"
              },
              "application_documents": {
                "bytes": 7667,
                "sha256": "680b33ae10c91839b7d894a6551d00e9d0361ec7e2ab8838a314ca35120571dd"
              },
              "application_reviews": {
                "bytes": 3649,
                "sha256": "4d5a995831fb6ec6f99cedfd86411e4c622b94a2cf2960f6bbc747cee76e4c04"
              },
              "audit_logs": {
                "bytes": 2118,
                "sha256": "b958c6752b360f35d686b1a97673d3b37d1076946b5bbb65428ed9fdf86b2452"
              },
              "branch_targets": {
                "bytes": 414,
                "sha256": "0ffe4b0cb38ec2c477f8032c1b091a2adb6597e5636a486a2c31989924259728"
              },
              "branches": {
                "bytes": 1397,
                "sha256": "5f866a1e728919b9ed7a3dba930783f1c91529ce1f42b69b4c2e84a6267481b0"
              },
              "collateral_types": {
                "bytes": 577,
                "sha256": "42b0e68bfaf77e9a281d14b96c2496ee25a366baa2c5cebfe083db0e58dfe9fa"
              },
              "collaterals": {
                "bytes": 1899,
                "sha256": "9b1e294c4db988d2183bf72a181c4a969a76080f91368e98011f97a72d2a16de"
              },
              "collections": {
                "bytes": 1198,
                "sha256": "2f6bdff6b33abf5c70b478533436f8e06ec9bb2a44b4030ee5315aab7d82e2ea"
              },
              "credit_scores": {
                "bytes": 1298,
                "sha256": "390e5ac09954067d37ce171a4ae4739529d9353bc57b2788338e91fcf58d5788"
              },
              "customer_references": {
                "bytes": 1424,
                "sha256": "1a791b6d38822dc27bd75e247e46258caac6a99c594623c910a91fea1297e16c"
              },
              "customers": {
                "bytes": 3210,
                "sha256": "8e0e732f9df1479a990a5b90ea0e5f4ebc2f13c737d69c0d009d8d29127eda09"
              },
              "delinquencies": {
                "bytes": 640,
                "sha256": "1e0b303c553f61aa444bda36f5ca612af67bebbbff55c46e9767b071d0c0e60e"
              },
              "departments": {
                "bytes": 256,
                "sha256": "09e86d7e8b5b498d1f71ba5066a45c65656390b599c17e68e56d01628a2ab60c"
              },
              "disbursements": {
                "bytes": 2016,
                "sha256": "ec88f24ffc61a3736bcdd5ccbb94484532fc68bf26700922a66bc8655038ecfd"
              },
              "employees": {
                "bytes": 949,
                "sha256": "ef419667fb30bfe833c0cdee376a111ad9ac1a4eea826c6ff4ec33f26904f88d"
              },
              "fee_types": {
                "bytes": 311,
                "sha256": "59cf19c7316ae22b23ee3cab37d6ab2756df9020ec49f9994a8d1002383f5a45"
              },
              "guarantors": {
                "bytes": 1060,
                "sha256": "e6a77fb385a33932d638c704b6815749f933e275239f41e3f98a7e626ba605a9"
              },
              "insurance_policies": {
                "bytes": 1074,
                "sha256": "c113f57a9c5ff0085250e6dc586d0cc7b12d815297f39d5c6d532633c2783947"
              },
              "legal_actions": {
                "bytes": 845,
                "sha256": "73ce8568cd1f438d0dccfd982e055cf9a977539636031c9ba8fbb98bf43a1ffe"
              },
              "loan_applications": {
                "bytes": 1862,
                "sha256": "db8641647750dafc364d1eaf267f00935869acb86daffcae50f2836524b30fc4"
              },
              "loan_fees": {
                "bytes": 1272,
                "sha256": "3d29b942dd9a2d5a2597361ca8d85276a8a0788580ebf564de4c5491bf75fbfc"
              },
              "loan_products": {
                "bytes": 1581,
                "sha256": "0bf7f29697515c45b25c670d21834ebe581d8cbc7751194710aa8a6ff4a30b40"
              },
              "loan_reschedules": {
                "bytes": 1009,
                "sha256": "993a516ab7fa4d5df9c36bb5df32ffd58ff42ed5dbd95324e477dd2524f59115"
              },
              "payment_allocations": {
                "bytes": 37921,
                "sha256": "eaa0c99c02a9afa800c02661cfc2a7b8b0060cae6cfd0f23c8fc312a8639f194"
              },
              "payment_methods": {
                "bytes": 171,
                "sha256": "a2c901b7356e602d5ec41a2f7ea69573bebd5dbea3133f5cc833a342b1d7cc2b"
              },
              "payments": {
                "bytes": 27987,
                "sha256": "365f488c4f3f3d5306677bbe2484db92026ea3222d795f3d37747813c7ce9488"
              },
              "penalties": {
                "bytes": 2318,
                "sha256": "c1afe3c48a6d7287a63e76f1de96e6e08c22ef8eb815c977a27add033556be1c"
              },
              "repayment_schedules": {
                "bytes": 28392,
                "sha256": "6bf2ccd154baa5c23ced4fbc0533f1484e4644464d9b76f7626d850cf1d81084"
              },
              "write_offs": {
                "bytes": 1031,
                "sha256": "c2309d09c3a2ca7c2d5560477dbd8114b30fab972313c420ee69ea2c7efaa12c"
              }
            },
            "contentType": "application/zip"
          }
        ],
        "checks": {
          "postgres": {
            "version": "18.3",
            "ok": true
          },
          "sqlite": {
            "version": "3.53.1",
            "ok": true
          },
          "notRun": [
            {
              "engine": "MySQL",
              "note": "Written from the same rows; not loaded here, no MySQL server runs in the build."
            }
          ]
        },
        "rules": [
          {
            "name": "Every loan starts on or after its application",
            "violations": 0
          },
          {
            "name": "Every payment is made on or after its loan started",
            "violations": 0
          },
          {
            "name": "Every instalment total is its principal plus its interest",
            "violations": 0
          },
          {
            "name": "A reschedule is approved on or after it is requested",
            "violations": 0
          },
          {
            "name": "Interest rates are between 3.5% and 24%",
            "violations": 0
          },
          {
            "name": "Each loan product, fee type and payment method appears once",
            "violations": 0
          }
        ],
        "dirty": {
          "report": {
            "rates": {
              "missing": 0.03,
              "typos": 0.03,
              "outliers": 0.005,
              "duplicates": 0.01
            },
            "tables": {
              "branches": {
                "duplicates": 0,
                "columns": {
                  "city": {
                    "missing": 1,
                    "typos": 0,
                    "outliers": 0
                  },
                  "code": {
                    "missing": 1,
                    "typos": 1,
                    "outliers": 0
                  },
                  "postal_code": {
                    "missing": 1,
                    "typos": 0,
                    "outliers": 0
                  },
                  "state": {
                    "missing": 0,
                    "typos": 1,
                    "outliers": 0
                  }
                }
              },
              "branch_targets": {
                "duplicates": 0,
                "columns": {
                  "collection_target": {
                    "missing": 1,
                    "typos": 0,
                    "outliers": 0
                  }
                }
              },
              "collateral_types": {
                "duplicates": 0,
                "columns": {
                  "name": {
                    "missing": 1,
                    "typos": 0,
                    "outliers": 0
                  }
                }
              },
              "customers": {
                "duplicates": 1,
                "columns": {
                  "address": {
                    "missing": 2,
                    "typos": 0,
                    "outliers": 0
                  },
                  "city": {
                    "missing": 0,
                    "typos": 1,
                    "outliers": 0
                  },
                  "date_of_birth": {
                    "missing": 1,
                    "typos": 0,
                    "outliers": 0
                  },
                  "first_name": {
                    "missing": 0,
                    "typos": 1,
                    "outliers": 0
                  },
                  "last_name": {
                    "missing": 1,
                    "typos": 1,
                    "outliers": 0
                  },
                  "monthly_income": {
                    "missing": 2,
                    "typos": 0,
                    "outliers": 0
                  },
                  "postal_code": {
                    "missing": 2,
                    "typos": 0,
                    "outliers": 0
                  }
                }
              },
              "credit_scores": {
                "duplicates": 0,
                "columns": {
                  "evaluation_date": {
                    "missing": 3,
                    "typos": 0,
                    "outliers": 0
                  },
                  "provider": {
                    "missing": 1,
                    "typos": 0,
                    "outliers": 0
                  },
                  "risk_rating": {
                    "missing": 1,
                    "typos": 0,
                    "outliers": 0
                  },
                  "score": {
                    "missing": 1,
                    "typos": 0,
                    "outliers": 0
                  }
                }
              },
              "customer_references": {
                "duplicates": 0,
                "columns": {
                  "email": {
                    "missing": 0,
                    "typos": 1,
                    "outliers": 0
                  },
                  "relationship": {
                    "missing": 1,
                    "typos": 0,
                    "outliers": 0
                  }
                }
              },
              "employees": {
                "duplicates": 0,
                "columns": {
                  "email": {
                    "missing": 1,
                    "typos": 0,
                    "outliers": 0
                  },
                  "hire_date": {
                    "missing": 1,
                    "typos": 0,
                    "outliers": 0
                  },
                  "phone": {
                    "missing": 1,
                    "typos": 0,
                    "outliers": 0
                  }
                }
              },
              "audit_logs": {
                "duplicates": 2,
                "columns": {
                  "action_performed": {
                    "missing": 0,
                    "typos": 2,
                    "outliers": 0
                  },
                  "new_values": {
                    "missing": 1,
                    "typos": 2,
                    "outliers": 0
                  },
                  "record_id": {
                    "missing": 1,
                    "typos": 0,
                    "outliers": 0
                  },
                  "target_table": {
                    "missing": 0,
                    "typos": 2,
                    "outliers": 0
                  },
                  "timestamp": {
                    "missing": 1,
                    "typos": 0,
                    "outliers": 0
                  }
                }
              },
              "loan_products": {
                "duplicates": 0,
                "columns": {
                  "description": {
                    "missing": 1,
                    "typos": 0,
                    "outliers": 0
                  },
                  "interest_type": {
                    "missing": 0,
                    "typos": 1,
                    "outliers": 0
                  },
                  "maximum_amount": {
                    "missing": 0,
                    "typos": 0,
                    "outliers": 1
                  }
                }
              },
              "loan_applications": {
                "duplicates": 0,
                "columns": {
                  "requested_amount": {
                    "missing": 2,
                    "typos": 0,
                    "outliers": 0
                  },
                  "requested_term_months": {
                    "missing": 1,
                    "typos": 0,
                    "outliers": 0
                  },
                  "status": {
                    "missing": 0,
                    "typos": 2,
                    "outliers": 0
                  }
                }
              },
              "active_loans": {
                "duplicates": 0,
                "columns": {
                  "end_date": {
                    "missing": 1,
                    "typos": 0,
                    "outliers": 0
                  },
                  "principal_amount": {
                    "missing": 1,
                    "typos": 0,
                    "outliers": 0
                  },
                  "status": {
                    "missing": 1,
                    "typos": 1,
                    "outliers": 0
                  }
                }
              },
              "application_documents": {
                "duplicates": 1,
                "columns": {
                  "document_type": {
                    "missing": 0,
                    "typos": 2,
                    "outliers": 0
                  },
                  "file_name": {
                    "missing": 4,
                    "typos": 5,
                    "outliers": 0
                  },
                  "file_path": {
                    "missing": 4,
                    "typos": 3,
                    "outliers": 0
                  },
                  "upload_date": {
                    "missing": 6,
                    "typos": 0,
                    "outliers": 0
                  },
                  "verification_status": {
                    "missing": 1,
                    "typos": 4,
                    "outliers": 0
                  }
                }
              },
              "application_reviews": {
                "duplicates": 0,
                "columns": {
                  "comments": {
                    "missing": 0,
                    "typos": 2,
                    "outliers": 0
                  },
                  "decision": {
                    "missing": 2,
                    "typos": 1,
                    "outliers": 0
                  },
                  "review_date": {
                    "missing": 2,
                    "typos": 0,
                    "outliers": 0
                  }
                }
              },
              "collaterals": {
                "duplicates": 0,
                "columns": {
                  "valuation_date": {
                    "missing": 1,
                    "typos": 0,
                    "outliers": 0
                  },
                  "verification_status": {
                    "missing": 1,
                    "typos": 0,
                    "outliers": 0
                  }
                }
              },
              "delinquencies": {
                "duplicates": 0,
                "columns": {
                  "days_past_due": {
                    "missing": 1,
                    "typos": 0,
                    "outliers": 0
                  },
                  "last_checked_date": {
                    "missing": 2,
                    "typos": 0,
                    "outliers": 0
                  },
                  "overdue_principal": {
                    "missing": 1,
                    "typos": 0,
                    "outliers": 0
                  }
                }
              },
              "collections": {
                "duplicates": 0,
                "columns": {
                  "contact_date": {
                    "missing": 1,
                    "typos": 0,
                    "outliers": 0
                  },
                  "contact_method": {
                    "missing": 0,
                    "typos": 1,
                    "outliers": 0
                  },
                  "outcome_notes": {
                    "missing": 1,
                    "typos": 0,
                    "outliers": 0
                  },
                  "promise_amount": {
                    "missing": 1,
                    "typos": 0,
                    "outliers": 0
                  }
                }
              },
              "disbursements": {
                "duplicates": 0,
                "columns": {
                  "account_number": {
                    "missing": 1,
                    "typos": 0,
                    "outliers": 0
                  },
                  "bank_name": {
                    "missing": 0,
                    "typos": 2,
                    "outliers": 0
                  },
                  "transaction_reference": {
                    "missing": 1,
                    "typos": 0,
                    "outliers": 0
                  }
                }
              },
              "guarantors": {
                "duplicates": 0,
                "columns": {
                  "email": {
                    "missing": 1,
                    "typos": 1,
                    "outliers": 0
                  },
                  "last_name": {
                    "missing": 1,
                    "typos": 1,
                    "outliers": 0
                  },
                  "relationship": {
                    "missing": 1,
                    "typos": 0,
                    "outliers": 0
                  }
                }
              },
              "insurance_policies": {
                "duplicates": 0,
                "columns": {
                  "coverage_amount": {
                    "missing": 3,
                    "typos": 0,
                    "outliers": 0
                  },
                  "premium_amount": {
                    "missing": 1,
                    "typos": 0,
                    "outliers": 0
                  }
                }
              },
              "legal_actions": {
                "duplicates": 0,
                "columns": {
                  "court_name": {
                    "missing": 1,
                    "typos": 0,
                    "outliers": 0
                  },
                  "filing_date": {
                    "missing": 1,
                    "typos": 0,
                    "outliers": 0
                  }
                }
              },
              "loan_fees": {
                "duplicates": 1,
                "columns": {
                  "amount_charged": {
                    "missing": 2,
                    "typos": 0,
                    "outliers": 0
                  },
                  "is_paid": {
                    "missing": 1,
                    "typos": 0,
                    "outliers": 0
                  }
                }
              },
              "loan_reschedules": {
                "duplicates": 0,
                "columns": {
                  "new_interest_rate": {
                    "missing": 1,
                    "typos": 0,
                    "outliers": 0
                  },
                  "reason": {
                    "missing": 1,
                    "typos": 0,
                    "outliers": 0
                  },
                  "request_date": {
                    "missing": 1,
                    "typos": 0,
                    "outliers": 0
                  }
                }
              },
              "payment_methods": {
                "duplicates": 0,
                "columns": {
                  "name": {
                    "missing": 0,
                    "typos": 1,
                    "outliers": 0
                  }
                }
              },
              "payments": {
                "duplicates": 6,
                "columns": {
                  "amount_paid": {
                    "missing": 17,
                    "typos": 0,
                    "outliers": 0
                  },
                  "payment_date": {
                    "missing": 24,
                    "typos": 0,
                    "outliers": 0
                  },
                  "transaction_reference": {
                    "missing": 19,
                    "typos": 15,
                    "outliers": 0
                  }
                }
              },
              "repayment_schedules": {
                "duplicates": 3,
                "columns": {
                  "due_date": {
                    "missing": 17,
                    "typos": 0,
                    "outliers": 0
                  },
                  "fees_due": {
                    "missing": 12,
                    "typos": 0,
                    "outliers": 2
                  },
                  "installment_number": {
                    "missing": 13,
                    "typos": 0,
                    "outliers": 4
                  },
                  "interest_due": {
                    "missing": 19,
                    "typos": 0,
                    "outliers": 4
                  },
                  "principal_due": {
                    "missing": 15,
                    "typos": 0,
                    "outliers": 5
                  },
                  "status": {
                    "missing": 14,
                    "typos": 20,
                    "outliers": 0
                  },
                  "total_due": {
                    "missing": 16,
                    "typos": 0,
                    "outliers": 3
                  }
                }
              },
              "payment_allocations": {
                "duplicates": 15,
                "columns": {
                  "fees_paid": {
                    "missing": 39,
                    "typos": 0,
                    "outliers": 2
                  },
                  "interest_paid": {
                    "missing": 26,
                    "typos": 0,
                    "outliers": 2
                  },
                  "penalty_paid": {
                    "missing": 29,
                    "typos": 0,
                    "outliers": 5
                  },
                  "principal_paid": {
                    "missing": 27,
                    "typos": 0,
                    "outliers": 3
                  }
                }
              },
              "penalties": {
                "duplicates": 0,
                "columns": {
                  "amount_charged": {
                    "missing": 1,
                    "typos": 0,
                    "outliers": 0
                  },
                  "reason": {
                    "missing": 2,
                    "typos": 2,
                    "outliers": 0
                  }
                }
              },
              "write_offs": {
                "duplicates": 0,
                "columns": {
                  "interest_written_off": {
                    "missing": 1,
                    "typos": 0,
                    "outliers": 0
                  }
                }
              }
            },
            "totals": {
              "missing": 369,
              "typos": 76,
              "outliers": 31,
              "duplicates": 29
            }
          },
          "downloads": [
            {
              "format": "dirty-sql-postgres",
              "label": "PostgreSQL, with faults",
              "file": "flagship/1k/dirty-postgres.sql.gz",
              "key": "datasets/loan-management-sample-database/v1/flagship/1k/dirty-postgres.sql.gz",
              "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/loan-management-sample-database/v1/flagship/1k/dirty-postgres.sql.gz",
              "bytes": 63499,
              "sha256": "0f0960ca7c47805fc44793fa31ba456a836ee827e3d45b1714f1373112a6dbce",
              "raw": {
                "bytes": 197987,
                "sha256": "d4fa88c6619da07fea5d572cd507fadfa39f456651b250ebd28792617f29cc11"
              },
              "contentType": "application/gzip"
            },
            {
              "format": "dirty-csv",
              "label": "CSV, with faults",
              "file": "flagship/1k/dirty-csv.zip",
              "key": "datasets/loan-management-sample-database/v1/flagship/1k/dirty-csv.zip",
              "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/loan-management-sample-database/v1/flagship/1k/dirty-csv.zip",
              "bytes": 66471,
              "sha256": "b7b44991d711b62e858b732f8fe2752401be61879870120ef5cba544b871f271",
              "tables": {
                "active_loans": {
                  "bytes": 1655,
                  "sha256": "5aca44b30eea78d5837f75267dc863a643790ce40d5645b5c6132645e017225f"
                },
                "application_documents": {
                  "bytes": 7489,
                  "sha256": "0212b8de92130e73fb654dee72dde9925bebdf184b7c264260b07f9ac0e04202"
                },
                "application_reviews": {
                  "bytes": 3595,
                  "sha256": "e33a2620e4944263b8a418ad2438c5fcc8141d5b7a0962d415115e71f53e668b"
                },
                "audit_logs": {
                  "bytes": 2240,
                  "sha256": "c131577f15e341a2e7956139de3fc6c49442d8a41c607ffaedaa44f1e3d97f22"
                },
                "branch_targets": {
                  "bytes": 405,
                  "sha256": "1f2281ddbad5733b0b8ddb59d52fa7122c3d8719cc95c107cbc84a86ebb3b00a"
                },
                "branches": {
                  "bytes": 1382,
                  "sha256": "ac51f3d2364e22fe32d0aa5aeb98586181a22cb240043c1581e8989d93f89168"
                },
                "collateral_types": {
                  "bytes": 570,
                  "sha256": "73c581d3e3f6038ad732446b763a32fc273cb4a32732156634f74a62340cb58a"
                },
                "collaterals": {
                  "bytes": 1881,
                  "sha256": "0d970a584448fe1e5e296427ccf777b51eb36bec8e3f6ca5295ca35b7a46db01"
                },
                "collections": {
                  "bytes": 1107,
                  "sha256": "d5c639d65792b85818bbd239b28081e63321bba816998aa020c6d320b09f159b"
                },
                "credit_scores": {
                  "bytes": 1245,
                  "sha256": "d6267bd2a376f8017c286cdb95cebcd20a27932fb480bc218031f99c6d9ca693"
                },
                "customer_references": {
                  "bytes": 1419,
                  "sha256": "5a84557e76b8a7289e2e1fd5ff39f1a61ed9474cc0831ff23592128f665a48fc"
                },
                "customers": {
                  "bytes": 3273,
                  "sha256": "2bc8932cb59837754aba7344fa80ca78635c2270be8a08183e7c6a1fe8914cf6"
                },
                "delinquencies": {
                  "bytes": 592,
                  "sha256": "bcd7a475e5cd85a4896205bb076fa4d5231e7c2273f555065219dcb65663256f"
                },
                "departments": {
                  "bytes": 256,
                  "sha256": "09e86d7e8b5b498d1f71ba5066a45c65656390b599c17e68e56d01628a2ab60c"
                },
                "disbursements": {
                  "bytes": 1993,
                  "sha256": "76b21c6ce790654c45bc707f0103fd48b06d5078060b8289ee087227f0f8dc4c"
                },
                "employees": {
                  "bytes": 899,
                  "sha256": "814cf6438cb984ff361ac84b3b5781498b238ab7a77febb1bef0c7cac83d9e57"
                },
                "fee_types": {
                  "bytes": 311,
                  "sha256": "59cf19c7316ae22b23ee3cab37d6ab2756df9020ec49f9994a8d1002383f5a45"
                },
                "guarantors": {
                  "bytes": 1025,
                  "sha256": "c713e1e231607811b9ff4291082262899c5c38bec5ed7db852f17e6d8a2045f6"
                },
                "insurance_policies": {
                  "bytes": 1046,
                  "sha256": "d3166300ab38a25a5d6fc6ca96f8c2ef96cbc59ab509cbd86fddd7261832bee0"
                },
                "legal_actions": {
                  "bytes": 822,
                  "sha256": "183555d8d1fd6b6f63acead556708751bf7d8a292afc71aa45d2ac9b27dd36e1"
                },
                "loan_applications": {
                  "bytes": 1847,
                  "sha256": "ce6c478c8b60c7427c24b2629f1e9c9d6a6f1d22f511b34abf73a9f53aff926b"
                },
                "loan_fees": {
                  "bytes": 1289,
                  "sha256": "b28a6396b74352175f1702385ae3d516f0ab85879c484fe8af63f13c27e13165"
                },
                "loan_products": {
                  "bytes": 1532,
                  "sha256": "1613764470597dc038016082e0a4b19ea5d1a56569f531933057bb0ff02419eb"
                },
                "loan_reschedules": {
                  "bytes": 930,
                  "sha256": "de2f4b6fd953abc4e55f237e56cfdfcb15b8c847b94a020f120f92ec04f6bbd1"
                },
                "payment_allocations": {
                  "bytes": 37847,
                  "sha256": "c8f383a11e181f4c737a90b839b9ca20f8453455fdd24aaf5eb272dfec4d1b00"
                },
                "payment_methods": {
                  "bytes": 174,
                  "sha256": "b0839c27040fc1b6bc428f07f97fb8a1c40fb3c014d96ceb8e6d93a3d227a425"
                },
                "payments": {
                  "bytes": 27462,
                  "sha256": "c1f2e4169f9c796b709e436acb30b0ada6ba061255913339c11126f2304ea217"
                },
                "penalties": {
                  "bytes": 2183,
                  "sha256": "6ed87c1af76c6674db330f04697bee8b8057ce156dd5b88e30db4ba89d5e3ebf"
                },
                "repayment_schedules": {
                  "bytes": 27945,
                  "sha256": "c0b3d79710414021f30e6a694d2f75813f7079ee11b642f730bdafd4f92e571d"
                },
                "write_offs": {
                  "bytes": 1024,
                  "sha256": "f4214278d3c41fc0badcedfbc585b2a3a8151934567b5641e56c58eef01810ba"
                }
              },
              "contentType": "application/zip"
            }
          ]
        }
      },
      "100k": {
        "rows": 243077,
        "counts": {
          "branches": 25,
          "branch_targets": 100,
          "collateral_types": 8,
          "customers": 2200,
          "credit_scores": 3000,
          "customer_references": 1900,
          "departments": 8,
          "employees": 130,
          "audit_logs": 3000,
          "fee_types": 8,
          "loan_products": 12,
          "loan_applications": 3800,
          "active_loans": 2500,
          "application_documents": 8000,
          "application_reviews": 3800,
          "collaterals": 1600,
          "delinquencies": 500,
          "collections": 1000,
          "disbursements": 2500,
          "guarantors": 1000,
          "insurance_policies": 1300,
          "legal_actions": 100,
          "loan_fees": 3800,
          "loan_reschedules": 200,
          "payment_methods": 6,
          "payments": 50000,
          "repayment_schedules": 50000,
          "payment_allocations": 100000,
          "penalties": 2500,
          "write_offs": 80
        },
        "notes": [],
        "downloads": [
          {
            "format": "sql-postgres",
            "label": "PostgreSQL",
            "file": "flagship/100k/postgres.sql.gz",
            "key": "datasets/loan-management-sample-database/v1/flagship/100k/postgres.sql.gz",
            "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/loan-management-sample-database/v1/flagship/100k/postgres.sql.gz",
            "bytes": 5593715,
            "sha256": "d3fd4072dc16bbe5981573b052f71081dcc22799cb22a4276dd49f5a506dc82e",
            "raw": {
              "bytes": 17862657,
              "sha256": "d59a2380d355a8477e864e8d4fcdfe63878c8d11051163e0a01b8f90630a6771"
            },
            "contentType": "application/gzip"
          },
          {
            "format": "sql-mysql",
            "label": "MySQL",
            "file": "flagship/100k/mysql.sql.gz",
            "key": "datasets/loan-management-sample-database/v1/flagship/100k/mysql.sql.gz",
            "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/loan-management-sample-database/v1/flagship/100k/mysql.sql.gz",
            "bytes": 5590641,
            "sha256": "33d27fb7162a1b6187e15760a89c2e7e03c56875c1da32dbd00d29f09aa8af51",
            "raw": {
              "bytes": 17837561,
              "sha256": "7835541918f9c7c41a26ec0f0af9ec374981e542547ebaa466fecfce1e71e992"
            },
            "contentType": "application/gzip"
          },
          {
            "format": "sql-sqlite",
            "label": "SQLite",
            "file": "flagship/100k/sqlite.sql.gz",
            "key": "datasets/loan-management-sample-database/v1/flagship/100k/sqlite.sql.gz",
            "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/loan-management-sample-database/v1/flagship/100k/sqlite.sql.gz",
            "bytes": 5589864,
            "sha256": "e01d80411ca8532a9d9d40bbefa1876019aa15620eb2c46ba45074f4863f7d75",
            "raw": {
              "bytes": 17834577,
              "sha256": "a8873b5028b3a2f1dedc1dc403b88a4e5d8e0176c317efc107ce933add9ad9e6"
            },
            "contentType": "application/gzip"
          },
          {
            "format": "csv",
            "label": "CSV",
            "file": "flagship/100k/csv.zip",
            "key": "datasets/loan-management-sample-database/v1/flagship/100k/csv.zip",
            "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/loan-management-sample-database/v1/flagship/100k/csv.zip",
            "bytes": 5630865,
            "sha256": "c43ce376e077a92fd070429501d77d357e92f59bb5a1bbbcbf755564732c79af",
            "tables": {
              "active_loans": {
                "bytes": 171443,
                "sha256": "c50a91993b07e3c1016f0a1991f168d5eef99c7ebfe2f2e96a9bcd7e91d1c0ba"
              },
              "application_documents": {
                "bytes": 794286,
                "sha256": "70977e7f398522b10a126715d57f24fd6e533003fba7a8fb36ac74cfe0cc57de"
              },
              "application_reviews": {
                "bytes": 374429,
                "sha256": "a84b72fe1a82c66f4afb46cfb3d762a310bb8b12693e902012442c3074cc0f76"
              },
              "audit_logs": {
                "bytes": 206814,
                "sha256": "b19c52664b76575638c48adb6994f542d4145c2b0aff705ea8f5c767f49eb830"
              },
              "branch_targets": {
                "bytes": 3556,
                "sha256": "b88c11a3938a3006c3d9c5f0179f3a97dc526efde6134012c89b6b62dd47483a"
              },
              "branches": {
                "bytes": 1377,
                "sha256": "75e66efc9e69036fb65abbee5d06fe56a09399b19b593aec9df46f7ed52fc79b"
              },
              "collateral_types": {
                "bytes": 614,
                "sha256": "b50ff6d31fe89180463ce7e12afffc3957443a8072a5aeb17c21726563e791bb"
              },
              "collaterals": {
                "bytes": 181955,
                "sha256": "7bdbe6400423f0ec8564a87568bf1488b19b6f4805db4d3d58ceaa6c93ed5ad1"
              },
              "collections": {
                "bytes": 112162,
                "sha256": "6777b97d638635ec0c6ea44bb427b4d31f7dc2e983fe896d718c09462d8e8256"
              },
              "credit_scores": {
                "bytes": 134352,
                "sha256": "1aa0095ae508b5b935383f1ba02d12882a3e3124d09c22538db4a6b9d9a60f08"
              },
              "customer_references": {
                "bytes": 141709,
                "sha256": "b37b4741c5a40382d829fe6108ae7c97543a9e25ee5d90b2920396f180cb9746"
              },
              "customers": {
                "bytes": 311325,
                "sha256": "5756ef50a4a7de0788b56f49cff22fb8ba8728a225c6e9e46aba38a17e2b1028"
              },
              "delinquencies": {
                "bytes": 28691,
                "sha256": "e624946009a7d28b0e36697f4362995b5406accb0bddd92de7fb090b757f21ab"
              },
              "departments": {
                "bytes": 256,
                "sha256": "d0be4868bce2094a0694a864e793fd9a58e2bdff37cc94d92797b70585380ca9"
              },
              "disbursements": {
                "bytes": 199338,
                "sha256": "e3fd263b2718c5ab19f83d388ea9fde1b8e873715afab5f9d8785ba2786295fe"
              },
              "employees": {
                "bytes": 11467,
                "sha256": "2934ec3a6c84394c288c61153a5663d64c025d4ff5f1a95492e39e8224b00fb0"
              },
              "fee_types": {
                "bytes": 310,
                "sha256": "b8e7d304c346c41a840774c23691814808871373d10f1d590c9d629bbcc79f0d"
              },
              "guarantors": {
                "bytes": 96247,
                "sha256": "81c4d21e9ad53b2e9b7671067817a099819b875a6753b16e201dc467697b4bb0"
              },
              "insurance_policies": {
                "bytes": 109284,
                "sha256": "707acd2b5ce43a3cdd50945d92f2f1cfc0bc86323661459715aa6cba2bc46ad6"
              },
              "legal_actions": {
                "bytes": 8025,
                "sha256": "54b12acb6cfc737a8d65703e390c4fb897f34dfe85fa1f08d136329dd592d251"
              },
              "loan_applications": {
                "bytes": 189714,
                "sha256": "3c9bc0be57ec9b9cf6b3eb75cde708bd35375f2569cc836fe6b5228c747b00d3"
              },
              "loan_fees": {
                "bytes": 134738,
                "sha256": "ff894c1a29b3651152767f64a3d6ca5b77cf756d72fe4ab4baa24ca3c26abb75"
              },
              "loan_products": {
                "bytes": 1595,
                "sha256": "89e6a0d29546c21880e93b94b13a1cd093b58c38f6708f99b413ee74abcdff44"
              },
              "loan_reschedules": {
                "bytes": 19883,
                "sha256": "ab03219736b1d326bf86a7ec15a67d3b3c8c1b81dce6e699467da58cd3464ac9"
              },
              "payment_allocations": {
                "bytes": 4370913,
                "sha256": "f994d52dd31bb54ddf370d45e3ff042c5a9d5169826a0a0f6399cbaf1e2656b8"
              },
              "payment_methods": {
                "bytes": 173,
                "sha256": "eef8c77ae392d06b2421a9b3957b5472030a322e962ed5832ee028db1c10e494"
              },
              "payments": {
                "bytes": 3015362,
                "sha256": "afdb39f48b4c8ca785e5bff5fe53b2a8281f17a23e8ddd5e9b162f4d05a081f8"
              },
              "penalties": {
                "bytes": 236907,
                "sha256": "38fe8316040ce40ca9edc6311b54547c47b793174eba0b6ae8348fac1a5156e1"
              },
              "repayment_schedules": {
                "bytes": 3007242,
                "sha256": "d6593120d709bffd51aac5c25de0c9893ee251ddd66e3da8e284546857033661"
              },
              "write_offs": {
                "bytes": 7876,
                "sha256": "a7fe667eaac1251f40fb790dc3ea640cc28a7cd419c68680a2f187d5a81b8820"
              }
            },
            "contentType": "application/zip"
          }
        ],
        "checks": {
          "postgres": {
            "version": "18.3",
            "ok": true
          },
          "sqlite": {
            "version": "3.53.1",
            "ok": true
          },
          "notRun": [
            {
              "engine": "MySQL",
              "note": "Written from the same rows; not loaded here, no MySQL server runs in the build."
            }
          ]
        },
        "rules": [
          {
            "name": "Every loan starts on or after its application",
            "violations": 0
          },
          {
            "name": "Every payment is made on or after its loan started",
            "violations": 0
          },
          {
            "name": "Every instalment total is its principal plus its interest",
            "violations": 0
          },
          {
            "name": "A reschedule is approved on or after it is requested",
            "violations": 0
          },
          {
            "name": "Interest rates are between 3.5% and 24%",
            "violations": 0
          },
          {
            "name": "Each loan product, fee type and payment method appears once",
            "violations": 0
          }
        ],
        "dirty": {
          "report": {
            "rates": {
              "missing": 0.03,
              "typos": 0.03,
              "outliers": 0.005,
              "duplicates": 0.01
            },
            "tables": {
              "branches": {
                "duplicates": 0,
                "columns": {
                  "city": {
                    "missing": 3,
                    "typos": 0,
                    "outliers": 0
                  },
                  "code": {
                    "missing": 3,
                    "typos": 1,
                    "outliers": 0
                  },
                  "name": {
                    "missing": 2,
                    "typos": 1,
                    "outliers": 0
                  },
                  "phone": {
                    "missing": 2,
                    "typos": 0,
                    "outliers": 0
                  },
                  "postal_code": {
                    "missing": 0,
                    "typos": 1,
                    "outliers": 0
                  },
                  "state": {
                    "missing": 0,
                    "typos": 4,
                    "outliers": 0
                  }
                }
              },
              "branch_targets": {
                "duplicates": 2,
                "columns": {
                  "collection_target": {
                    "missing": 5,
                    "typos": 0,
                    "outliers": 1
                  },
                  "disbursement_target": {
                    "missing": 4,
                    "typos": 0,
                    "outliers": 1
                  },
                  "target_month": {
                    "missing": 1,
                    "typos": 0,
                    "outliers": 1
                  }
                }
              },
              "customers": {
                "duplicates": 17,
                "columns": {
                  "address": {
                    "missing": 68,
                    "typos": 79,
                    "outliers": 0
                  },
                  "city": {
                    "missing": 67,
                    "typos": 64,
                    "outliers": 0
                  },
                  "date_of_birth": {
                    "missing": 62,
                    "typos": 0,
                    "outliers": 0
                  },
                  "email": {
                    "missing": 69,
                    "typos": 70,
                    "outliers": 0
                  },
                  "employment_status": {
                    "missing": 69,
                    "typos": 79,
                    "outliers": 0
                  },
                  "first_name": {
                    "missing": 63,
                    "typos": 68,
                    "outliers": 0
                  },
                  "last_name": {
                    "missing": 70,
                    "typos": 61,
                    "outliers": 0
                  },
                  "monthly_income": {
                    "missing": 70,
                    "typos": 0,
                    "outliers": 8
                  },
                  "national_id": {
                    "missing": 66,
                    "typos": 65,
                    "outliers": 0
                  },
                  "phone": {
                    "missing": 58,
                    "typos": 22,
                    "outliers": 0
                  },
                  "postal_code": {
                    "missing": 76,
                    "typos": 27,
                    "outliers": 0
                  },
                  "state": {
                    "missing": 88,
                    "typos": 62,
                    "outliers": 0
                  }
                }
              },
              "credit_scores": {
                "duplicates": 31,
                "columns": {
                  "evaluation_date": {
                    "missing": 98,
                    "typos": 0,
                    "outliers": 0
                  },
                  "provider": {
                    "missing": 102,
                    "typos": 91,
                    "outliers": 0
                  },
                  "risk_rating": {
                    "missing": 98,
                    "typos": 82,
                    "outliers": 0
                  },
                  "score": {
                    "missing": 108,
                    "typos": 0,
                    "outliers": 14
                  }
                }
              },
              "customer_references": {
                "duplicates": 17,
                "columns": {
                  "email": {
                    "missing": 61,
                    "typos": 61,
                    "outliers": 0
                  },
                  "full_name": {
                    "missing": 54,
                    "typos": 59,
                    "outliers": 0
                  },
                  "phone": {
                    "missing": 62,
                    "typos": 6,
                    "outliers": 0
                  },
                  "relationship": {
                    "missing": 51,
                    "typos": 54,
                    "outliers": 0
                  }
                }
              },
              "departments": {
                "duplicates": 0,
                "columns": {
                  "cost_center": {
                    "missing": 1,
                    "typos": 0,
                    "outliers": 0
                  },
                  "name": {
                    "missing": 1,
                    "typos": 0,
                    "outliers": 0
                  }
                }
              },
              "employees": {
                "duplicates": 3,
                "columns": {
                  "email": {
                    "missing": 0,
                    "typos": 5,
                    "outliers": 0
                  },
                  "first_name": {
                    "missing": 1,
                    "typos": 0,
                    "outliers": 0
                  },
                  "hire_date": {
                    "missing": 4,
                    "typos": 0,
                    "outliers": 0
                  },
                  "job_title": {
                    "missing": 3,
                    "typos": 6,
                    "outliers": 0
                  },
                  "last_name": {
                    "missing": 5,
                    "typos": 5,
                    "outliers": 0
                  },
                  "phone": {
                    "missing": 2,
                    "typos": 1,
                    "outliers": 0
                  }
                }
              },
              "audit_logs": {
                "duplicates": 20,
                "columns": {
                  "action_performed": {
                    "missing": 90,
                    "typos": 98,
                    "outliers": 0
                  },
                  "new_values": {
                    "missing": 86,
                    "typos": 100,
                    "outliers": 0
                  },
                  "old_values": {
                    "missing": 62,
                    "typos": 56,
                    "outliers": 0
                  },
                  "record_id": {
                    "missing": 100,
                    "typos": 0,
                    "outliers": 18
                  },
                  "target_table": {
                    "missing": 81,
                    "typos": 98,
                    "outliers": 0
                  },
                  "timestamp": {
                    "missing": 84,
                    "typos": 0,
                    "outliers": 0
                  }
                }
              },
              "fee_types": {
                "duplicates": 0,
                "columns": {
                  "code": {
                    "missing": 0,
                    "typos": 1,
                    "outliers": 0
                  }
                }
              },
              "loan_products": {
                "duplicates": 0,
                "columns": {
                  "maximum_amount": {
                    "missing": 0,
                    "typos": 0,
                    "outliers": 2
                  },
                  "maximum_term_months": {
                    "missing": 2,
                    "typos": 0,
                    "outliers": 1
                  },
                  "minimum_term_months": {
                    "missing": 1,
                    "typos": 0,
                    "outliers": 0
                  },
                  "name": {
                    "missing": 1,
                    "typos": 0,
                    "outliers": 0
                  }
                }
              },
              "loan_applications": {
                "duplicates": 47,
                "columns": {
                  "application_date": {
                    "missing": 108,
                    "typos": 0,
                    "outliers": 0
                  },
                  "requested_amount": {
                    "missing": 104,
                    "typos": 0,
                    "outliers": 18
                  },
                  "requested_term_months": {
                    "missing": 111,
                    "typos": 0,
                    "outliers": 18
                  },
                  "status": {
                    "missing": 130,
                    "typos": 96,
                    "outliers": 0
                  }
                }
              },
              "active_loans": {
                "duplicates": 26,
                "columns": {
                  "end_date": {
                    "missing": 73,
                    "typos": 0,
                    "outliers": 0
                  },
                  "interest_rate": {
                    "missing": 87,
                    "typos": 0,
                    "outliers": 11
                  },
                  "principal_amount": {
                    "missing": 78,
                    "typos": 0,
                    "outliers": 10
                  },
                  "start_date": {
                    "missing": 65,
                    "typos": 0,
                    "outliers": 0
                  },
                  "status": {
                    "missing": 76,
                    "typos": 81,
                    "outliers": 0
                  },
                  "term_months": {
                    "missing": 80,
                    "typos": 0,
                    "outliers": 13
                  }
                }
              },
              "application_documents": {
                "duplicates": 74,
                "columns": {
                  "document_type": {
                    "missing": 221,
                    "typos": 234,
                    "outliers": 0
                  },
                  "file_name": {
                    "missing": 248,
                    "typos": 246,
                    "outliers": 0
                  },
                  "file_path": {
                    "missing": 236,
                    "typos": 235,
                    "outliers": 0
                  },
                  "upload_date": {
                    "missing": 229,
                    "typos": 0,
                    "outliers": 0
                  },
                  "verification_status": {
                    "missing": 219,
                    "typos": 249,
                    "outliers": 0
                  }
                }
              },
              "application_reviews": {
                "duplicates": 43,
                "columns": {
                  "comments": {
                    "missing": 131,
                    "typos": 122,
                    "outliers": 0
                  },
                  "decision": {
                    "missing": 101,
                    "typos": 118,
                    "outliers": 0
                  },
                  "review_date": {
                    "missing": 127,
                    "typos": 0,
                    "outliers": 0
                  }
                }
              },
              "collaterals": {
                "duplicates": 16,
                "columns": {
                  "description": {
                    "missing": 51,
                    "typos": 50,
                    "outliers": 0
                  },
                  "estimated_value": {
                    "missing": 37,
                    "typos": 0,
                    "outliers": 5
                  },
                  "valuation_date": {
                    "missing": 47,
                    "typos": 0,
                    "outliers": 0
                  },
                  "valuer_name": {
                    "missing": 57,
                    "typos": 45,
                    "outliers": 0
                  },
                  "verification_status": {
                    "missing": 50,
                    "typos": 50,
                    "outliers": 0
                  }
                }
              },
              "delinquencies": {
                "duplicates": 3,
                "columns": {
                  "days_past_due": {
                    "missing": 22,
                    "typos": 0,
                    "outliers": 1
                  },
                  "last_checked_date": {
                    "missing": 9,
                    "typos": 0,
                    "outliers": 0
                  },
                  "overdue_interest": {
                    "missing": 15,
                    "typos": 0,
                    "outliers": 2
                  },
                  "overdue_principal": {
                    "missing": 11,
                    "typos": 0,
                    "outliers": 1
                  },
                  "status": {
                    "missing": 26,
                    "typos": 19,
                    "outliers": 0
                  }
                }
              },
              "collections": {
                "duplicates": 12,
                "columns": {
                  "contact_date": {
                    "missing": 26,
                    "typos": 0,
                    "outliers": 0
                  },
                  "contact_method": {
                    "missing": 27,
                    "typos": 33,
                    "outliers": 0
                  },
                  "outcome_notes": {
                    "missing": 43,
                    "typos": 33,
                    "outliers": 0
                  },
                  "promise_amount": {
                    "missing": 23,
                    "typos": 0,
                    "outliers": 3
                  },
                  "promise_to_pay_date": {
                    "missing": 17,
                    "typos": 0,
                    "outliers": 0
                  }
                }
              },
              "disbursements": {
                "duplicates": 31,
                "columns": {
                  "account_number": {
                    "missing": 79,
                    "typos": 20,
                    "outliers": 0
                  },
                  "amount": {
                    "missing": 86,
                    "typos": 0,
                    "outliers": 10
                  },
                  "bank_name": {
                    "missing": 82,
                    "typos": 78,
                    "outliers": 0
                  },
                  "disbursement_date": {
                    "missing": 77,
                    "typos": 0,
                    "outliers": 0
                  },
                  "transaction_reference": {
                    "missing": 88,
                    "typos": 78,
                    "outliers": 0
                  }
                }
              },
              "guarantors": {
                "duplicates": 11,
                "columns": {
                  "annual_income": {
                    "missing": 32,
                    "typos": 0,
                    "outliers": 7
                  },
                  "email": {
                    "missing": 33,
                    "typos": 24,
                    "outliers": 0
                  },
                  "first_name": {
                    "missing": 23,
                    "typos": 39,
                    "outliers": 0
                  },
                  "last_name": {
                    "missing": 31,
                    "typos": 27,
                    "outliers": 0
                  },
                  "national_id": {
                    "missing": 28,
                    "typos": 26,
                    "outliers": 0
                  },
                  "phone": {
                    "missing": 26,
                    "typos": 13,
                    "outliers": 0
                  },
                  "relationship": {
                    "missing": 31,
                    "typos": 31,
                    "outliers": 0
                  }
                }
              },
              "insurance_policies": {
                "duplicates": 19,
                "columns": {
                  "coverage_amount": {
                    "missing": 44,
                    "typos": 0,
                    "outliers": 8
                  },
                  "end_date": {
                    "missing": 31,
                    "typos": 0,
                    "outliers": 0
                  },
                  "policy_number": {
                    "missing": 43,
                    "typos": 30,
                    "outliers": 0
                  },
                  "premium_amount": {
                    "missing": 47,
                    "typos": 0,
                    "outliers": 2
                  },
                  "provider_name": {
                    "missing": 31,
                    "typos": 45,
                    "outliers": 0
                  },
                  "start_date": {
                    "missing": 36,
                    "typos": 0,
                    "outliers": 0
                  }
                }
              },
              "legal_actions": {
                "duplicates": 0,
                "columns": {
                  "action_type": {
                    "missing": 4,
                    "typos": 3,
                    "outliers": 0
                  },
                  "case_number": {
                    "missing": 5,
                    "typos": 3,
                    "outliers": 0
                  },
                  "court_name": {
                    "missing": 3,
                    "typos": 6,
                    "outliers": 0
                  },
                  "expense_incurred": {
                    "missing": 4,
                    "typos": 0,
                    "outliers": 1
                  },
                  "filing_date": {
                    "missing": 2,
                    "typos": 0,
                    "outliers": 0
                  }
                }
              },
              "loan_fees": {
                "duplicates": 37,
                "columns": {
                  "amount_charged": {
                    "missing": 114,
                    "typos": 0,
                    "outliers": 16
                  },
                  "charge_date": {
                    "missing": 125,
                    "typos": 0,
                    "outliers": 0
                  },
                  "is_paid": {
                    "missing": 104,
                    "typos": 0,
                    "outliers": 0
                  }
                }
              },
              "loan_reschedules": {
                "duplicates": 2,
                "columns": {
                  "approval_date": {
                    "missing": 4,
                    "typos": 0,
                    "outliers": 0
                  },
                  "new_interest_rate": {
                    "missing": 3,
                    "typos": 0,
                    "outliers": 0
                  },
                  "new_term_months": {
                    "missing": 6,
                    "typos": 0,
                    "outliers": 1
                  },
                  "reason": {
                    "missing": 5,
                    "typos": 2,
                    "outliers": 0
                  },
                  "request_date": {
                    "missing": 4,
                    "typos": 0,
                    "outliers": 0
                  }
                }
              },
              "payments": {
                "duplicates": 520,
                "columns": {
                  "amount_paid": {
                    "missing": 1418,
                    "typos": 0,
                    "outliers": 254
                  },
                  "payment_date": {
                    "missing": 1528,
                    "typos": 0,
                    "outliers": 0
                  },
                  "transaction_reference": {
                    "missing": 1494,
                    "typos": 1525,
                    "outliers": 0
                  }
                }
              },
              "repayment_schedules": {
                "duplicates": 492,
                "columns": {
                  "due_date": {
                    "missing": 1489,
                    "typos": 0,
                    "outliers": 0
                  },
                  "fees_due": {
                    "missing": 1507,
                    "typos": 0,
                    "outliers": 251
                  },
                  "installment_number": {
                    "missing": 1560,
                    "typos": 0,
                    "outliers": 234
                  },
                  "interest_due": {
                    "missing": 1440,
                    "typos": 0,
                    "outliers": 221
                  },
                  "principal_due": {
                    "missing": 1596,
                    "typos": 0,
                    "outliers": 248
                  },
                  "status": {
                    "missing": 1473,
                    "typos": 1490,
                    "outliers": 0
                  },
                  "total_due": {
                    "missing": 1478,
                    "typos": 0,
                    "outliers": 258
                  }
                }
              },
              "payment_allocations": {
                "duplicates": 992,
                "columns": {
                  "fees_paid": {
                    "missing": 3005,
                    "typos": 0,
                    "outliers": 498
                  },
                  "interest_paid": {
                    "missing": 2957,
                    "typos": 0,
                    "outliers": 479
                  },
                  "penalty_paid": {
                    "missing": 3049,
                    "typos": 0,
                    "outliers": 497
                  },
                  "principal_paid": {
                    "missing": 3023,
                    "typos": 0,
                    "outliers": 517
                  }
                }
              },
              "penalties": {
                "duplicates": 27,
                "columns": {
                  "amount_charged": {
                    "missing": 75,
                    "typos": 0,
                    "outliers": 23
                  },
                  "charge_date": {
                    "missing": 72,
                    "typos": 0,
                    "outliers": 0
                  },
                  "is_paid": {
                    "missing": 68,
                    "typos": 0,
                    "outliers": 0
                  },
                  "reason": {
                    "missing": 82,
                    "typos": 70,
                    "outliers": 0
                  }
                }
              },
              "write_offs": {
                "duplicates": 2,
                "columns": {
                  "interest_written_off": {
                    "missing": 9,
                    "typos": 0,
                    "outliers": 0
                  },
                  "principal_written_off": {
                    "missing": 0,
                    "typos": 0,
                    "outliers": 1
                  },
                  "reason": {
                    "missing": 6,
                    "typos": 1,
                    "outliers": 0
                  },
                  "write_off_date": {
                    "missing": 2,
                    "typos": 0,
                    "outliers": 0
                  }
                }
              }
            },
            "totals": {
              "missing": 33451,
              "typos": 6449,
              "outliers": 3654,
              "duplicates": 2444
            }
          },
          "downloads": [
            {
              "format": "dirty-sql-postgres",
              "label": "PostgreSQL, with faults",
              "file": "flagship/100k/dirty-postgres.sql.gz",
              "key": "datasets/loan-management-sample-database/v1/flagship/100k/dirty-postgres.sql.gz",
              "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/loan-management-sample-database/v1/flagship/100k/dirty-postgres.sql.gz",
              "bytes": 5623848,
              "sha256": "025f19532f88d035b530602cc10c1b34dd6f82fff0e155bbcb88fab2c7cd4a36",
              "raw": {
                "bytes": 17875408,
                "sha256": "425e1499acab4a6a06392507730c3e53bf64d3760ae6472e80ae68af5f25c6e1"
              },
              "contentType": "application/gzip"
            },
            {
              "format": "dirty-csv",
              "label": "CSV, with faults",
              "file": "flagship/100k/dirty-csv.zip",
              "key": "datasets/loan-management-sample-database/v1/flagship/100k/dirty-csv.zip",
              "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/loan-management-sample-database/v1/flagship/100k/dirty-csv.zip",
              "bytes": 5633122,
              "sha256": "7a989b23b9a2e6fdbd12f3ce2ac1c6acb10f8a950ec6449a5591ea9767609c8d",
              "tables": {
                "active_loans": {
                  "bytes": 170317,
                  "sha256": "22c25c24cc179fd4de8e4d6b97916e6088bcf35a4c89572c80a7a404c9d46789"
                },
                "application_documents": {
                  "bytes": 783683,
                  "sha256": "d6cc223ba8c613eaa6279b7ca2a69b16d4899b620a3c62e12b702fe5383b32b7"
                },
                "application_reviews": {
                  "bytes": 368337,
                  "sha256": "91cfd21ac1c4493897c1c37d682d1c31fd38043c5eee573d45a6eb222c6c7b85"
                },
                "audit_logs": {
                  "bytes": 203940,
                  "sha256": "4b5066885f4eefd4cfeda68aa19c52219edc37712fbc7864405c0e0426a06112"
                },
                "branch_targets": {
                  "bytes": 3539,
                  "sha256": "35ca2b0a326b001909ce100b68a1eef02c9a61404f879d526e5cfc57f3372e53"
                },
                "branches": {
                  "bytes": 1297,
                  "sha256": "2eb91788717de5108af5e096db5e96731bc5ce8eff2eee6e630a81bb7c37ff62"
                },
                "collateral_types": {
                  "bytes": 614,
                  "sha256": "b50ff6d31fe89180463ce7e12afffc3957443a8072a5aeb17c21726563e791bb"
                },
                "collaterals": {
                  "bytes": 179189,
                  "sha256": "b0b10e8eee14ffb755b64a1a6b4203d77ac67c694643883db035dbecce2788a6"
                },
                "collections": {
                  "bytes": 110240,
                  "sha256": "994678dafca07625357815ed7c2cd13499b6260e0d68f48320db7ef43da40f50"
                },
                "credit_scores": {
                  "bytes": 132902,
                  "sha256": "0414d0fb54c24ae2cbc893b1d9e760d6058759fa7201eaa09526a0b1dccc9ea3"
                },
                "customer_references": {
                  "bytes": 139640,
                  "sha256": "93027c620a2289b854c72eff9ed386509efeddfe2a37482cbff88584dc50c627"
                },
                "customers": {
                  "bytes": 306086,
                  "sha256": "b19ff5d6749757b559347eb9714c4fff041496dd9090064f3a20ba5f8f77797e"
                },
                "delinquencies": {
                  "bytes": 28298,
                  "sha256": "be83e7459ca64ecc0585f4333b967dc86b134fc8e6f1993fca365820fa70e41c"
                },
                "departments": {
                  "bytes": 239,
                  "sha256": "27a6adbddce0e9f56756897010645c3bfe83ee6fa148907753a159b37a630068"
                },
                "disbursements": {
                  "bytes": 196584,
                  "sha256": "8b0260103a33a68dc322e1fa052ab9b2ec055a41ad610537ec7b32540eb18d2b"
                },
                "employees": {
                  "bytes": 11652,
                  "sha256": "a416905048053a98e744da855c87f2cef7cb69d7ffa340b9b88dcceeab7f9fb9"
                },
                "fee_types": {
                  "bytes": 310,
                  "sha256": "8d7143287572e231e262412e9c9cf1389d5adc4e77717715ba71ed707f8d6211"
                },
                "guarantors": {
                  "bytes": 95120,
                  "sha256": "124f2b378143b394dc615b34705564b20558b47f836954cd0f9a61cf4efa8267"
                },
                "insurance_policies": {
                  "bytes": 108268,
                  "sha256": "21b93a72fbf0714ea295004a7048a2e58c64ee48a827897e1738363e03636172"
                },
                "legal_actions": {
                  "bytes": 7840,
                  "sha256": "502da9bbd75a523ba081b36ec0d8b59cade5e0a8f782788ff394e157dd03d5b1"
                },
                "loan_applications": {
                  "bytes": 188948,
                  "sha256": "539e8286945f97b30f9c0665bc0328a97153d7e743e60818713ade5fd56bd426"
                },
                "loan_fees": {
                  "bytes": 133666,
                  "sha256": "38807419f1d5b32118ed1d0e392ffb97e523d676b19b9304ae58722d2fffa458"
                },
                "loan_products": {
                  "bytes": 1577,
                  "sha256": "6830fa43e375a479598c847272994bbdbf29f325dc5ae5dd87099a68bddba0eb"
                },
                "loan_reschedules": {
                  "bytes": 19712,
                  "sha256": "3e2cd09b5864fea1aa68313a106df1a21dabf8e4db2a04dbfa590ff9f2214f21"
                },
                "payment_allocations": {
                  "bytes": 4350196,
                  "sha256": "0b070fc3790fba405cea260cc4dd5db9e0be9d93ab115d4c91150aede6c3f98a"
                },
                "payment_methods": {
                  "bytes": 173,
                  "sha256": "eef8c77ae392d06b2421a9b3957b5472030a322e962ed5832ee028db1c10e494"
                },
                "payments": {
                  "bytes": 2985794,
                  "sha256": "be7290e054388dedfb5f2f1ee472b65493c727696777bd35426693a1a18c7b40"
                },
                "penalties": {
                  "bytes": 233517,
                  "sha256": "164024fa8cf76c61683dc945fe51cec775afcc62f012c142758df234ae75563e"
                },
                "repayment_schedules": {
                  "bytes": 2976540,
                  "sha256": "98a7db6709eecb5ad3437d761a3088eb493f9114be6abebabf07c222daca52de"
                },
                "write_offs": {
                  "bytes": 7624,
                  "sha256": "5a96d5913913b947a71b1b5dbda05cbc5a2e263a4ca90832f7178a1f9f5c896b"
                }
              },
              "contentType": "application/zip"
            }
          ]
        }
      },
      "1m": {
        "rows": 2430167,
        "counts": {
          "branches": 25,
          "branch_targets": 1000,
          "collateral_types": 8,
          "customers": 22000,
          "credit_scores": 30000,
          "customer_references": 19000,
          "departments": 8,
          "employees": 1300,
          "audit_logs": 30000,
          "fee_types": 8,
          "loan_products": 12,
          "loan_applications": 38000,
          "active_loans": 25000,
          "application_documents": 80000,
          "application_reviews": 38000,
          "collaterals": 16000,
          "delinquencies": 5000,
          "collections": 10000,
          "disbursements": 25000,
          "guarantors": 10000,
          "insurance_policies": 13000,
          "legal_actions": 1000,
          "loan_fees": 38000,
          "loan_reschedules": 2000,
          "payment_methods": 6,
          "payments": 500000,
          "repayment_schedules": 500000,
          "payment_allocations": 1000000,
          "penalties": 25000,
          "write_offs": 800
        },
        "notes": [
          "At this size the tables beside payment_allocations were cut to 1/16 of it, so the whole build stays under 3,000,000 rows."
        ],
        "downloads": [
          {
            "format": "sql-postgres",
            "label": "PostgreSQL",
            "file": "flagship/1m/postgres.sql.gz",
            "key": "datasets/loan-management-sample-database/v1/flagship/1m/postgres.sql.gz",
            "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/loan-management-sample-database/v1/flagship/1m/postgres.sql.gz",
            "bytes": 58204387,
            "sha256": "560b02afe54bdc783e61d0ebbb05596ba40a28a2cb019c4ab1e02aae1a7862f8",
            "raw": {
              "bytes": 184777913,
              "sha256": "93e13ec9eee3bd5bea5f2a857f9db0018b644708a7a28d14167c089679d7aa37"
            },
            "contentType": "application/gzip"
          },
          {
            "format": "sql-mysql",
            "label": "MySQL",
            "file": "flagship/1m/mysql.sql.gz",
            "key": "datasets/loan-management-sample-database/v1/flagship/1m/mysql.sql.gz",
            "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/loan-management-sample-database/v1/flagship/1m/mysql.sql.gz",
            "bytes": 58190195,
            "sha256": "9f09eb4d0708799718c0634ac0290b17efa82291871c12ce6f6b79f2a76abd64",
            "raw": {
              "bytes": 184554406,
              "sha256": "f810a5c27119ef06108653db1f51e1c2482b2ab9678fdda8d64f1dbbf352f2c4"
            },
            "contentType": "application/gzip"
          },
          {
            "format": "sql-sqlite",
            "label": "SQLite",
            "file": "flagship/1m/sqlite.sql.gz",
            "key": "datasets/loan-management-sample-database/v1/flagship/1m/sqlite.sql.gz",
            "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/loan-management-sample-database/v1/flagship/1m/sqlite.sql.gz",
            "bytes": 58189493,
            "sha256": "19472d5aba92599d513ccc923ebdcf714553e3164a7c56dbaf1142842f707976",
            "raw": {
              "bytes": 184551422,
              "sha256": "450676e18d99e6d6cbe1087462a92efe6a23c232db7b5f47b2eb1d8dfae28b7b"
            },
            "contentType": "application/gzip"
          },
          {
            "format": "csv",
            "label": "CSV",
            "file": "flagship/1m/csv.zip",
            "key": "datasets/loan-management-sample-database/v1/flagship/1m/csv.zip",
            "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/loan-management-sample-database/v1/flagship/1m/csv.zip",
            "bytes": 58931077,
            "sha256": "03ee6877f070af5b795c8930eb51900efa33ee5d4a90320b87f17b5ef8844674",
            "tables": {
              "active_loans": {
                "bytes": 1811131,
                "sha256": "1a6fa116af770e616a59038846ac76f60b409816eea6d7adf7970c99618cb4dd"
              },
              "application_documents": {
                "bytes": 8168452,
                "sha256": "285589cf52a5f3eb1c465d5f1537fd5dd93fed17d1044ed5aaa851c7e2802d96"
              },
              "application_reviews": {
                "bytes": 3846359,
                "sha256": "a917d93213555f986d566ff96709e1ab270db3a52640afcdf8cf4c87086d095b"
              },
              "audit_logs": {
                "bytes": 2127234,
                "sha256": "3d7db44f8368195debfeebcfcd8485bebc8e2a22c4636807422b958cb455afbb"
              },
              "branch_targets": {
                "bytes": 35747,
                "sha256": "e8d6ff7ada4442be851ce3a957498f58294bc70d705dbe488fd9b5c2d305a87e"
              },
              "branches": {
                "bytes": 1381,
                "sha256": "4c7ce42d778d1d7f86c8ae1cbd21cfb9e7be52aa9a0120a85fbeb28a6e19237e"
              },
              "collateral_types": {
                "bytes": 554,
                "sha256": "38a10486ade00496e94a26c681b7ac3c2ba6045809752bf1e31c396de5551fd3"
              },
              "collaterals": {
                "bytes": 1844435,
                "sha256": "1309b99066004bfe443bda29cc8c5ac248071fd8d17afb6bd8a974bdb5e4a31d"
              },
              "collections": {
                "bytes": 1150192,
                "sha256": "8e6f6b494f4cd66e162d016d1c8fbef472905824a957c8fb6834ea87851e6b87"
              },
              "credit_scores": {
                "bytes": 1400350,
                "sha256": "c9202dd2bb54094260b79d02179298e68d086f7ace8cde0ecbecfdf22778cdca"
              },
              "customer_references": {
                "bytes": 1451474,
                "sha256": "018233732dc1d47e8d6866ddeeadcfc41a91cca9f96c7cc0c969f998c72f4352"
              },
              "customers": {
                "bytes": 3131916,
                "sha256": "7975937c855e83bdc40f1a6f40d1d7061ff1b87b293d376fcd5949fb8db349b2"
              },
              "delinquencies": {
                "bytes": 296560,
                "sha256": "cba6cb88cc4389cf98fc657003803ff9b4db985558a03aed58b17b00fd0809c6"
              },
              "departments": {
                "bytes": 256,
                "sha256": "0d93f63e454ed9aa2fd5e90bc2fdef17cd281ae1c5e811459867466b5bd868f9"
              },
              "disbursements": {
                "bytes": 2062639,
                "sha256": "bc766b297e091066935004ad01fdb1b5356880881ca2b5d17921868c2d6c524b"
              },
              "employees": {
                "bytes": 114811,
                "sha256": "355b885d1451e12b22a6a790262736ad1877964b9b36e9f257e252459bb8eb58"
              },
              "fee_types": {
                "bytes": 314,
                "sha256": "2c9ad56159ec81722643cd30ba5973acf02b3118a461ba8de053ebc0e2612f61"
              },
              "guarantors": {
                "bytes": 980648,
                "sha256": "f2bf933e4921dc60157d8d70eb6ef433104f07b3dfda17dfa86a8b7dbebb5c89"
              },
              "insurance_policies": {
                "bytes": 1112947,
                "sha256": "b009500730395c5cdc396acd9039f33962ac22b05b350469b9c1a10f4e09b457"
              },
              "legal_actions": {
                "bytes": 81320,
                "sha256": "f624e50f7cc3e673d4e61f173f30d5e0daed3328b0e9aaec64219d8dc832202b"
              },
              "loan_applications": {
                "bytes": 2004965,
                "sha256": "6c0164f88bd64b0c6810309c46e67e0c43171edb2f9a2399a8a8695521c9bc7d"
              },
              "loan_fees": {
                "bytes": 1422311,
                "sha256": "f14c75f4d1e8aac0c968bb9486fb9eed9ecfde39a6853b818959f649b0a3afea"
              },
              "loan_products": {
                "bytes": 1601,
                "sha256": "8e6c3b468d9dfba8411c8a2951402dc8d3399cc828ba7c945b32ba57a565a35c"
              },
              "loan_reschedules": {
                "bytes": 203499,
                "sha256": "6e988d581d62fba46cf0937856097b780db8d629bf1d66ec03b2c1766d404496"
              },
              "payment_allocations": {
                "bytes": 46698798,
                "sha256": "e19fdee318ec18288405a260538a5428a3dc84c7ca8c3ce15e88c5a6b2dfcda3"
              },
              "payment_methods": {
                "bytes": 172,
                "sha256": "671f0635c6514f96db76a3096312ebc6b2bee608625f1e7d5d0e5479a4e3140b"
              },
              "payments": {
                "bytes": 31588938,
                "sha256": "c375875724c5ab7929929a2331b8fc4d1c74f067412b8fb1f27c416796b6c80b"
              },
              "penalties": {
                "bytes": 2440524,
                "sha256": "e49269b77e99a693f81d0b410b638e57589ab94ff8595ce6b80e8495740ae6f5"
              },
              "repayment_schedules": {
                "bytes": 31065368,
                "sha256": "1faefd98ac26c515417955a9fc185cb792828e54c2033a6c7a59d2c767e23af9"
              },
              "write_offs": {
                "bytes": 78459,
                "sha256": "d343cbe76b8fa6a59cab44b0c5c206f2ceeebcf9d99fcb8ce97285cd34663e73"
              }
            },
            "contentType": "application/zip"
          }
        ],
        "checks": {
          "postgres": {
            "version": "18.3",
            "ok": true
          },
          "sqlite": {
            "version": "3.53.1",
            "ok": true
          },
          "notRun": [
            {
              "engine": "MySQL",
              "note": "Written from the same rows; not loaded here, no MySQL server runs in the build."
            }
          ]
        },
        "rules": [
          {
            "name": "Every loan starts on or after its application",
            "violations": 0
          },
          {
            "name": "Every payment is made on or after its loan started",
            "violations": 0
          },
          {
            "name": "Every instalment total is its principal plus its interest",
            "violations": 0
          },
          {
            "name": "A reschedule is approved on or after it is requested",
            "violations": 0
          },
          {
            "name": "Interest rates are between 3.5% and 24%",
            "violations": 0
          },
          {
            "name": "Each loan product, fee type and payment method appears once",
            "violations": 0
          }
        ]
      }
    },
    "rules": [
      {
        "name": "Every loan starts on or after its application",
        "sql": "SELECT count(*) AS violations FROM active_loans l JOIN loan_applications a ON a.id = l.application_id WHERE l.start_date < a.application_date"
      },
      {
        "name": "Every payment is made on or after its loan started",
        "sql": "SELECT count(*) AS violations FROM payments p JOIN active_loans l ON l.id = p.loan_id WHERE p.payment_date::date < l.start_date"
      },
      {
        "name": "Every instalment total is its principal plus its interest",
        "sql": "SELECT count(*) AS violations FROM repayment_schedules WHERE total_due <> principal_due + interest_due"
      },
      {
        "name": "A reschedule is approved on or after it is requested",
        "sql": "SELECT count(*) AS violations FROM loan_reschedules WHERE approval_date < request_date"
      },
      {
        "name": "Interest rates are between 3.5% and 24%",
        "sql": "SELECT count(*) AS violations FROM active_loans WHERE interest_rate NOT BETWEEN 3.5 AND 24"
      },
      {
        "name": "Each loan product, fee type and payment method appears once",
        "sql": "SELECT (SELECT count(*) - count(DISTINCT name) FROM loan_products) + (SELECT count(*) - count(DISTINCT name) FROM fee_types) + (SELECT count(*) - count(DISTINCT name) FROM payment_methods) AS violations"
      }
    ]
  },
  "publishedAt": 1791305176029,
  "updatedAt": 1791305176029
}
