{
  "format": "dataset-manifest/1",
  "slug": "property-listings",
  "version": 2,
  "seed": "property-listings:1",
  "spec": {
    "format": "dataset/1",
    "slug": "property-listings",
    "name": "Property Listings",
    "tagline": "Real estate listings including properties, agents, viewings, and transaction details from an estate agency.",
    "description": "An estate agency operates in a dynamic environment where properties are listed, viewed, and sold. This dataset reflects that reality through multiple tables that represent different aspects of the real estate process. The properties table holds information about available properties, including their addresses and features such as the number of bedrooms and bathrooms. The agents table contains details about the real estate agents managing these properties, linking them to the listings they handle. The listings table records the properties available for sale, along with their current prices and any historical price changes. Viewings represent the scheduled appointments for potential buyers to visit properties, while offers capture the bids made by buyers. Finally, the transactions table documents completed sales, providing insight into which offers were accepted. This synthetic dataset allows developers to practice SQL queries and mock APIs related to real estate operations.",
    "domain": "real-estate",
    "shape": "transactional",
    "useCases": [
      "sql-practice",
      "api-mocking"
    ],
    "keywords": [
      "real estate",
      "properties",
      "agents",
      "listings",
      "viewings",
      "offers",
      "transactions"
    ],
    "locale": "en",
    "license": "CC0-1.0",
    "version": 1,
    "tables": {
      "properties": {
        "description": "This table contains details about properties, including their unique identifiers, features, and addresses.",
        "rows": 300,
        "columns": {
          "id": {
            "kind": "pk",
            "description": "Unique identifier for each property."
          },
          "address": {
            "kind": "fullName",
            "description": "Full address of the property."
          },
          "bedrooms": {
            "kind": "int",
            "min": 1,
            "max": 10,
            "description": "Number of bedrooms in the property.",
            "nullable": true
          },
          "bathrooms": {
            "kind": "int",
            "min": 1,
            "max": 5,
            "description": "Number of bathrooms in the property.",
            "nullable": true
          },
          "square_feet": {
            "kind": "int",
            "min": 500,
            "max": 10000,
            "description": "Total area of the property in square feet.",
            "nullable": true,
            "distribution": "normal"
          },
          "property_type": {
            "kind": "enum",
            "values": [
              "house",
              "apartment",
              "condo",
              "townhouse"
            ],
            "description": "Type of the property.",
            "weights": [
              6,
              3,
              2,
              1
            ]
          }
        }
      },
      "agents": {
        "description": "This table includes information about real estate agents who manage the property listings.",
        "rows": 50,
        "columns": {
          "id": {
            "kind": "pk",
            "description": "Unique identifier for each agent."
          },
          "full_name": {
            "kind": "fullName",
            "description": "Full name of the agent."
          },
          "email": {
            "kind": "email",
            "from": "full_name",
            "description": "Contact email of the agent."
          },
          "phone": {
            "kind": "phone",
            "description": "Contact phone number of the agent."
          }
        }
      },
      "listings": {
        "description": "This table records the properties that are currently listed for sale, including pricing and status.",
        "rows": 300,
        "columns": {
          "id": {
            "kind": "pk",
            "description": "Unique identifier for each listing."
          },
          "property_id": {
            "kind": "fk",
            "ref": "properties.id",
            "description": "Reference to the property being listed."
          },
          "agent_id": {
            "kind": "fk",
            "ref": "agents.id",
            "description": "Reference to the agent managing the listing."
          },
          "current_price": {
            "kind": "decimal",
            "min": 10000,
            "max": 2000000,
            "scale": 2,
            "description": "Current listing price of the property.",
            "nullable": true,
            "distribution": "long-tail"
          },
          "price_history": {
            "kind": "json",
            "template": {
              "date": {
                "kind": "date",
                "from": "2020-01-01",
                "to": "2023-12-31"
              },
              "price": {
                "kind": "decimal",
                "min": 10000,
                "max": 2000000,
                "scale": 2
              }
            },
            "description": "Historical price changes for the listing.",
            "nullable": true
          }
        }
      },
      "viewings": {
        "description": "This table tracks the viewings scheduled for properties, including date and time.",
        "rows": 600,
        "columns": {
          "id": {
            "kind": "pk",
            "description": "Unique identifier for each viewing."
          },
          "listing_id": {
            "kind": "fk",
            "ref": "listings.id",
            "description": "Reference to the listing being viewed."
          },
          "scheduled_at": {
            "kind": "datetime",
            "from": "2023-01-01",
            "to": "2023-12-31",
            "description": "Date and time of the scheduled viewing.",
            "nullable": true,
            "dayProfile": "waking"
          }
        }
      },
      "offers": {
        "description": "This table captures the offers made by potential buyers on property listings.",
        "rows": 500,
        "columns": {
          "id": {
            "kind": "pk",
            "description": "Unique identifier for each offer."
          },
          "listing_id": {
            "kind": "fk",
            "ref": "listings.id",
            "description": "Reference to the listing for which the offer is made."
          },
          "offer_amount": {
            "kind": "decimal",
            "min": 10000,
            "max": 2000000,
            "scale": 2,
            "description": "Amount of the offer made by the buyer.",
            "nullable": true,
            "when": {
              "column": "status",
              "in": [
                "pending",
                "accepted",
                "rejected"
              ]
            },
            "distribution": "long-tail"
          },
          "status": {
            "kind": "enum",
            "values": [
              "pending",
              "accepted",
              "rejected"
            ],
            "description": "Current status of the offer.",
            "weights": [
              5,
              4,
              1
            ]
          }
        }
      },
      "transactions": {
        "description": "This table records completed transactions detailing accepted offers.",
        "rows": 250,
        "columns": {
          "id": {
            "kind": "pk",
            "description": "Unique identifier for each transaction."
          },
          "offer_id": {
            "kind": "fk",
            "ref": "offers.id",
            "description": "Reference to the accepted offer."
          },
          "transaction_date": {
            "kind": "date",
            "from": "2023-01-01",
            "to": "2023-12-31",
            "description": "Date when the transaction was completed.",
            "trend": "growing"
          }
        }
      }
    },
    "structure": "multi-table",
    "traits": [
      "categorical",
      "timestamped",
      "monetary",
      "nullable"
    ],
    "analysisQuestions": [
      "What types of properties are most frequently listed?",
      "Which agents have the highest number of successful transactions?",
      "How do viewing schedules affect the likelihood of offers being made?",
      "What is the average price change of properties over time?",
      "What percentage of offers are accepted compared to those made?"
    ],
    "suggestedQueries": [
      {
        "title": "Join Listings with Properties",
        "sql": "SELECT l.id, p.address, l.current_price FROM listings l JOIN properties p ON l.property_id = p.id;",
        "dialect": "postgres"
      },
      {
        "title": "Count Offers by Status",
        "sql": "SELECT status, COUNT(*) FROM offers GROUP BY status;",
        "dialect": "postgres"
      },
      {
        "title": "Average Offer Amount for Accepted Offers",
        "sql": "SELECT AVG(offer_amount) FROM offers WHERE status = 'accepted';",
        "dialect": "postgres"
      },
      {
        "title": "Viewings and Offers Correlation",
        "sql": "SELECT COUNT(v.id) AS viewing_count, COUNT(o.id) AS offer_count FROM viewings v LEFT JOIN offers o ON v.listing_id = o.listing_id GROUP BY v.listing_id;",
        "dialect": "postgres"
      }
    ],
    "usageScenarios": [
      {
        "title": "Real Estate Analytics",
        "body": "A data analyst at a real estate agency can utilize this dataset to analyze trends in property prices over time. By examining the price history and correlating it with the status of offers, they can provide insights to management on optimal pricing strategies."
      },
      {
        "title": "Agent Performance Review",
        "body": "A real estate firm can use this dataset to evaluate the performance of its agents. By querying the transactions table, management can identify which agents are closing the most deals and how their viewing strategies impact offer acceptance rates."
      },
      {
        "title": "API Development for Real Estate Applications",
        "body": "Developers creating real estate applications can mock their APIs using this dataset. By generating responses based on various properties and their listings, they can simulate real-world interactions for testing purposes, ensuring their applications handle data accurately."
      }
    ]
  },
  "counts": {
    "agents": 50,
    "properties": 300,
    "listings": 300,
    "offers": 500,
    "transactions": 250,
    "viewings": 600
  },
  "stats": {
    "properties": {
      "rows": 300,
      "columns": {
        "id": {
          "nulls": 0,
          "distinct": 300,
          "min": 1,
          "max": 300
        },
        "address": {
          "nulls": 0,
          "distinct": 296,
          "min": "Alice Adams",
          "max": "Zoe Smith"
        },
        "bedrooms": {
          "nulls": 41,
          "distinct": 10,
          "min": 1,
          "max": 10
        },
        "bathrooms": {
          "nulls": 43,
          "distinct": 5,
          "min": 1,
          "max": 5
        },
        "square_feet": {
          "nulls": 22,
          "distinct": 273,
          "min": 1755,
          "max": 8428
        },
        "property_type": {
          "nulls": 0,
          "distinct": 4,
          "min": "apartment",
          "max": "townhouse"
        }
      }
    },
    "agents": {
      "rows": 50,
      "columns": {
        "id": {
          "nulls": 0,
          "distinct": 50,
          "min": 1,
          "max": 50
        },
        "full_name": {
          "nulls": 0,
          "distinct": 49,
          "min": "Alice Gomez",
          "max": "Zoe Hughes"
        },
        "email": {
          "nulls": 0,
          "distinct": 50
        },
        "phone": {
          "nulls": 0,
          "distinct": 47
        }
      }
    },
    "listings": {
      "rows": 300,
      "columns": {
        "id": {
          "nulls": 0,
          "distinct": 300,
          "min": 1,
          "max": 300
        },
        "property_id": {
          "nulls": 0,
          "distinct": 189,
          "min": 1,
          "max": 300
        },
        "agent_id": {
          "nulls": 0,
          "distinct": 50,
          "min": 1,
          "max": 50
        },
        "current_price": {
          "nulls": 30,
          "distinct": 270,
          "min": 10004.86,
          "max": 1980483.9
        },
        "price_history": {
          "nulls": 31,
          "distinct": 269
        }
      }
    },
    "viewings": {
      "rows": 600,
      "columns": {
        "id": {
          "nulls": 0,
          "distinct": 600,
          "min": 1,
          "max": 600
        },
        "listing_id": {
          "nulls": 0,
          "distinct": 259,
          "min": 1,
          "max": 300
        },
        "scheduled_at": {
          "nulls": 58,
          "distinct": 542,
          "min": "2023-01-01 18:09:39",
          "max": "2023-12-31 22:18:52"
        }
      }
    },
    "offers": {
      "rows": 500,
      "columns": {
        "id": {
          "nulls": 0,
          "distinct": 500,
          "min": 1,
          "max": 500
        },
        "listing_id": {
          "nulls": 0,
          "distinct": 237,
          "min": 1,
          "max": 300
        },
        "offer_amount": {
          "nulls": 0,
          "distinct": 500,
          "min": 10017.31,
          "max": 1995472.08
        },
        "status": {
          "nulls": 0,
          "distinct": 3,
          "min": "accepted",
          "max": "rejected"
        }
      }
    },
    "transactions": {
      "rows": 250,
      "columns": {
        "id": {
          "nulls": 0,
          "distinct": 250,
          "min": 1,
          "max": 250
        },
        "offer_id": {
          "nulls": 0,
          "distinct": 193,
          "min": 3,
          "max": 500
        },
        "transaction_date": {
          "nulls": 0,
          "distinct": 173,
          "min": "2023-01-06",
          "max": "2023-12-31"
        }
      }
    }
  },
  "artifacts": [
    {
      "file": "csv/agents.csv",
      "format": "csv",
      "table": "agents",
      "key": "datasets/property-listings/v2/csv/agents.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/property-listings/v2/csv/agents.csv",
      "bytes": 2827,
      "sha256": "35022d4fb7ede09a746ecd8f28c155671f5b2f870fc7522846af945a1ae6f0be",
      "rows": 50,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/properties.csv",
      "format": "csv",
      "table": "properties",
      "key": "datasets/property-listings/v2/csv/properties.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/property-listings/v2/csv/properties.csv",
      "bytes": 9866,
      "sha256": "8de92811016caeb3c1c4f92f46162e107519c9ddef440459b880ff036fe162e3",
      "rows": 300,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/listings.csv",
      "format": "csv",
      "table": "listings",
      "key": "datasets/property-listings/v2/csv/listings.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/property-listings/v2/csv/listings.csv",
      "bytes": 19165,
      "sha256": "2d8bbbfc9157d10b6280bde171bfe06f8cb5efeda4210d3404a7d2c3d8031375",
      "rows": 300,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/offers.csv",
      "format": "csv",
      "table": "offers",
      "key": "datasets/property-listings/v2/csv/offers.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/property-listings/v2/csv/offers.csv",
      "bytes": 13483,
      "sha256": "96cb519ff75e92184ffbae7d2ddd43bc100e02c0c404a8356046a7ebedd642be",
      "rows": 500,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/transactions.csv",
      "format": "csv",
      "table": "transactions",
      "key": "datasets/property-listings/v2/csv/transactions.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/property-listings/v2/csv/transactions.csv",
      "bytes": 4870,
      "sha256": "d4cc0250287116461a08702e5b7a9ca1e053145209debea3123db5baf23cd770",
      "rows": 250,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/viewings.csv",
      "format": "csv",
      "table": "viewings",
      "key": "datasets/property-listings/v2/csv/viewings.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/property-listings/v2/csv/viewings.csv",
      "bytes": 16011,
      "sha256": "df358f7213ce2b217e64add9134d9090fc6a017a31b99f40c2dcc1f4234aa9a4",
      "rows": 600,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "property-listings.json",
      "format": "json",
      "table": null,
      "key": "datasets/property-listings/v2/property-listings.json",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/property-listings/v2/property-listings.json",
      "bytes": 252738,
      "sha256": "4025adf739f72f5edf6ce31c3261986857616cdab0132d7fd83981d8be838959",
      "rows": null,
      "contentType": "application/json; charset=utf-8"
    },
    {
      "file": "sql/postgres.sql",
      "format": "sql-postgres",
      "table": null,
      "key": "datasets/property-listings/v2/sql/postgres.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/property-listings/v2/sql/postgres.sql",
      "bytes": 91098,
      "sha256": "e7ad461aff8ab3d36c879e9cd2b3d2f82c12cbd52c2d53140ee82021380f7b7f",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "sql/mysql.sql",
      "format": "sql-mysql",
      "table": null,
      "key": "datasets/property-listings/v2/sql/mysql.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/property-listings/v2/sql/mysql.sql",
      "bytes": 90421,
      "sha256": "3aaabe18d8fa8527289ca0ac1873647d040caf26a299b5c90f7c4ff9fdfb563f",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "sql/mssql.sql",
      "format": "sql-mssql",
      "table": null,
      "key": "datasets/property-listings/v2/sql/mssql.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/property-listings/v2/sql/mssql.sql",
      "bytes": 93118,
      "sha256": "a4bfac90f32fc3c1029d563ec78f9f79e6babc11e83eb178cc1c458813dc6681",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "sql/sqlite.sql",
      "format": "sql-sqlite",
      "table": null,
      "key": "datasets/property-listings/v2/sql/sqlite.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/property-listings/v2/sql/sqlite.sql",
      "bytes": 90212,
      "sha256": "40750a398f36d8d013fb63f2bae8c77de7337b1ada49e2214b94f5c616c08a57",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "prisma/seed.ts",
      "format": "prisma-seed",
      "table": null,
      "key": "datasets/property-listings/v2/prisma/seed.ts",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/property-listings/v2/prisma/seed.ts",
      "bytes": 197697,
      "sha256": "d894d1549fb7334d94868c3f88fbef52db2793d58449e95a1af67542dae506e9",
      "rows": null,
      "contentType": "application/typescript; charset=utf-8"
    },
    {
      "file": "django/fixtures.json",
      "format": "django-fixture",
      "table": null,
      "key": "datasets/property-listings/v2/django/fixtures.json",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/property-listings/v2/django/fixtures.json",
      "bytes": 337123,
      "sha256": "b9fae952f2401e434fa342365f75780818cadaba888050f9b9266f897c0d73f5",
      "rows": null,
      "contentType": "application/json; charset=utf-8"
    }
  ],
  "publishedAt": 1788768609814,
  "updatedAt": 1788785581683
}
