{
  "format": "dataset-manifest/1",
  "slug": "follows-and-posts",
  "version": 3,
  "seed": "follows-and-posts:1",
  "spec": {
    "format": "dataset/1",
    "slug": "follows-and-posts",
    "name": "Follows and Posts",
    "tagline": "Modeling interactions in a social network.",
    "description": "Users create posts and engage with one another on a vibrant social network. The interactions among users reflect their relationships through follows, likes, and replies, creating a dynamic ecosystem where content and engagement thrive. With a diverse range of user profiles, some accounts become major hubs of activity, drawing the attention of many followers while others cultivate smaller, more intimate networks.\n\nThe dataset includes several tables: the users table captures user profiles, detailing their unique identifiers, usernames, and other relevant information. The follows table tracks the relationships between users, indicating who follows whom. Posts table contains content created by users, with each entry representing an individual post along with timestamps and other metadata. Lastly, the interactions table records user engagement with posts, including likes and replies, allowing for a nuanced understanding of how content resonates within the community.\n\nEach row in the follows table connects two users, while each post is tied to its creator in the users table, illustrating the content generation aspect of the platform. The interactions table links back to both the users and posts tables, providing insights into which posts are most engaging and how users are responding.\n\nThis dataset is particularly helpful for exploring questions about user engagement, follower behavior, and content popularity. Developers can practice querying relationships between users, analyzing interaction patterns, and examining the dynamics of social influence and engagement on the platform. The data is synthetic, designed to mimic real-world social network dynamics, allowing for a safe environment to test and learn.",
    "domain": "social",
    "shape": "graph-edges",
    "useCases": [
      "sql-practice",
      "teaching"
    ],
    "keywords": [
      "social network",
      "users",
      "posts",
      "follows",
      "likes",
      "interactions",
      "data analysis",
      "SQL"
    ],
    "locale": "en",
    "license": "CC0-1.0",
    "version": 1,
    "tables": {
      "users": {
        "description": "This table contains user profiles, with each row representing a unique user. It includes details such as the user's name and follower count.",
        "rows": 200,
        "columns": {
          "id": {
            "kind": "pk",
            "description": "Unique identifier for each user."
          },
          "full_name": {
            "kind": "fullName",
            "description": "The full name of the user."
          },
          "email": {
            "kind": "email",
            "from": "full_name",
            "description": "Email address of the user."
          },
          "follower_count": {
            "kind": "int",
            "min": 0,
            "max": 10000,
            "distribution": "heavy-tail",
            "description": "Number of followers the user has."
          }
        }
      },
      "follows": {
        "description": "This table captures the follow relationships between users. Each row links a follower to a followee.",
        "rows": 400,
        "columns": {
          "id": {
            "kind": "pk",
            "description": "Unique identifier for each follow relationship."
          },
          "follower_id": {
            "kind": "fk",
            "ref": "users.id",
            "description": "The user who follows another user."
          },
          "followee_id": {
            "kind": "fk",
            "ref": "users.id",
            "description": "The user being followed."
          }
        }
      },
      "posts": {
        "description": "This table includes posts made by users. Each row represents a unique post with associated metadata.",
        "rows": 300,
        "columns": {
          "id": {
            "kind": "pk",
            "description": "Unique identifier for each post."
          },
          "user_id": {
            "kind": "fk",
            "ref": "users.id",
            "description": "The user who created the post."
          },
          "content": {
            "kind": "sentence",
            "description": "The textual content of the post."
          },
          "created_at": {
            "kind": "datetime",
            "from": "2023-01-01",
            "to": "2023-12-31",
            "description": "Timestamp when the post was created.",
            "dayProfile": "waking"
          }
        }
      },
      "interactions": {
        "description": "This table records user interactions with posts, such as likes and replies. Each row represents an interaction.",
        "rows": 500,
        "columns": {
          "id": {
            "kind": "pk",
            "description": "Unique identifier for each interaction."
          },
          "post_id": {
            "kind": "fk",
            "ref": "posts.id",
            "description": "The post associated with the interaction."
          },
          "user_id": {
            "kind": "fk",
            "ref": "users.id",
            "description": "The user who interacted with the post."
          },
          "interaction_type": {
            "kind": "enum",
            "values": [
              "like",
              "reply"
            ],
            "description": "Type of interaction with the post.",
            "weights": [
              8,
              2
            ]
          },
          "interaction_content": {
            "kind": "sentence",
            "nullable": true,
            "description": "Content of the reply, if applicable."
          }
        }
      }
    },
    "structure": "multi-table",
    "traits": [
      "categorical",
      "nullable",
      "high-cardinality",
      "timestamped"
    ],
    "analysisQuestions": [
      "Which users have the most followers and what does this indicate about their engagement?",
      "What types of posts receive the most likes or replies?",
      "How does follower count influence the likelihood of a user interacting with posts?"
    ],
    "suggestedQueries": [
      {
        "title": "Get all posts with their user information",
        "sql": "SELECT posts.id, posts.content, users.full_name FROM posts JOIN users ON posts.user_id = users.id;",
        "dialect": "postgres"
      },
      {
        "title": "Count likes per post",
        "sql": "SELECT post_id, COUNT(*) AS like_count FROM interactions WHERE interaction_type = 'like' GROUP BY post_id;",
        "dialect": "postgres"
      },
      {
        "title": "Find users who followed a specific user",
        "sql": "SELECT follower_id FROM follows WHERE followee_id = (SELECT id FROM users WHERE full_name = 'John Doe');",
        "dialect": "postgres"
      },
      {
        "title": "List most liked posts with user details",
        "sql": "SELECT posts.id, posts.content, users.full_name, COUNT(interactions.id) AS like_count FROM posts LEFT JOIN interactions ON posts.id = interactions.post_id AND interactions.interaction_type = 'like' JOIN users ON posts.user_id = users.id GROUP BY posts.id, users.full_name ORDER BY like_count DESC;",
        "dialect": "postgres"
      }
    ],
    "usageScenarios": [
      {
        "title": "Social Media Analytics",
        "body": "Data analysts working for a social media platform can utilize this dataset to analyze user behavior patterns, understand posting habits, and gauge the overall engagement levels across the platform. They can execute complex SQL queries to derive insights and prepare reports for stakeholders."
      },
      {
        "title": "Teaching SQL Concepts",
        "body": "Instructors can use this dataset in a classroom setting to teach SQL concepts. The multi-table structure provides a real-world context for students to learn about joins, aggregations, and data relationships. Students can practice writing queries that extract meaningful insights from social network data."
      },
      {
        "title": "Developing Social Network Features",
        "body": "Software developers can leverage this dataset while building features for social networking applications. They can test functionalities such as user following mechanisms, post interactions, and analytics dashboards using realistic data, ensuring their features work as intended before going live."
      }
    ]
  },
  "counts": {
    "users": 200,
    "follows": 400,
    "posts": 300,
    "interactions": 500
  },
  "stats": {
    "users": {
      "rows": 200,
      "columns": {
        "id": {
          "nulls": 0,
          "distinct": 200,
          "min": 1,
          "max": 200
        },
        "full_name": {
          "nulls": 0,
          "distinct": 196,
          "min": "Alice Ahmed",
          "max": "Zoe Davis"
        },
        "email": {
          "nulls": 0,
          "distinct": 198
        },
        "follower_count": {
          "nulls": 0,
          "distinct": 178,
          "min": 0,
          "max": 9976
        }
      }
    },
    "follows": {
      "rows": 400,
      "columns": {
        "id": {
          "nulls": 0,
          "distinct": 400,
          "min": 1,
          "max": 400
        },
        "follower_id": {
          "nulls": 0,
          "distinct": 173,
          "min": 1,
          "max": 200
        },
        "followee_id": {
          "nulls": 0,
          "distinct": 174,
          "min": 1,
          "max": 200
        }
      }
    },
    "posts": {
      "rows": 300,
      "columns": {
        "id": {
          "nulls": 0,
          "distinct": 300,
          "min": 1,
          "max": 300
        },
        "user_id": {
          "nulls": 0,
          "distinct": 159,
          "min": 1,
          "max": 200
        },
        "content": {
          "nulls": 0,
          "distinct": 298
        },
        "created_at": {
          "nulls": 0,
          "distinct": 300,
          "min": "2023-01-01 17:48:30",
          "max": "2023-12-31 20:12:32"
        }
      }
    },
    "interactions": {
      "rows": 500,
      "columns": {
        "id": {
          "nulls": 0,
          "distinct": 500,
          "min": 1,
          "max": 500
        },
        "post_id": {
          "nulls": 0,
          "distinct": 237,
          "min": 1,
          "max": 300
        },
        "user_id": {
          "nulls": 0,
          "distinct": 182,
          "min": 1,
          "max": 200
        },
        "interaction_type": {
          "nulls": 0,
          "distinct": 2,
          "min": "like",
          "max": "reply"
        },
        "interaction_content": {
          "nulls": 49,
          "distinct": 449
        }
      }
    }
  },
  "artifacts": [
    {
      "file": "csv/users.csv",
      "format": "csv",
      "table": "users",
      "key": "datasets/follows-and-posts/v3/csv/users.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/follows-and-posts/v3/csv/users.csv",
      "bytes": 9003,
      "sha256": "6515b7b0b556344e05bae5270488585376d0666e5a74233ee713290e28ec9e74",
      "rows": 200,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/follows.csv",
      "format": "csv",
      "table": "follows",
      "key": "datasets/follows-and-posts/v3/csv/follows.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/follows-and-posts/v3/csv/follows.csv",
      "bytes": 4685,
      "sha256": "33bc873512bef751cd0f31a0dd82bf739230e3278dfe9b0d5b83ec275d8495f9",
      "rows": 400,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/posts.csv",
      "format": "csv",
      "table": "posts",
      "key": "datasets/follows-and-posts/v3/csv/posts.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/follows-and-posts/v3/csv/posts.csv",
      "bytes": 25334,
      "sha256": "465aa8a43bf04efa1f910f5dce18aff9a01a20d53e1ad60ff00c77c5c06d698c",
      "rows": 300,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "csv/interactions.csv",
      "format": "csv",
      "table": "interactions",
      "key": "datasets/follows-and-posts/v3/csv/interactions.csv",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/follows-and-posts/v3/csv/interactions.csv",
      "bytes": 34243,
      "sha256": "a4ba8e3ac6631f8d98457faa766d190f19085361e611095c0ae68400a63ae7b3",
      "rows": 500,
      "contentType": "text/csv; charset=utf-8"
    },
    {
      "file": "follows-and-posts.json",
      "format": "json",
      "table": null,
      "key": "datasets/follows-and-posts/v3/follows-and-posts.json",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/follows-and-posts/v3/follows-and-posts.json",
      "bytes": 203990,
      "sha256": "6e57ef77eb77b8d315dd4bb675921ae0b3c5f2f3ccea6aa9046d24b7bc2ed4e4",
      "rows": null,
      "contentType": "application/json; charset=utf-8"
    },
    {
      "file": "sql/postgres.sql",
      "format": "sql-postgres",
      "table": null,
      "key": "datasets/follows-and-posts/v3/sql/postgres.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/follows-and-posts/v3/sql/postgres.sql",
      "bytes": 92292,
      "sha256": "25df583e4358f419f82dac304819ead033f8df193c307a9729f9afc43e8e6746",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "sql/mysql.sql",
      "format": "sql-mysql",
      "table": null,
      "key": "datasets/follows-and-posts/v3/sql/mysql.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/follows-and-posts/v3/sql/mysql.sql",
      "bytes": 91850,
      "sha256": "9195aa1cce265a5550f6768b9e63a4584718ea59fa4b134409fde0d198a5a5ab",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "sql/mssql.sql",
      "format": "sql-mssql",
      "table": null,
      "key": "datasets/follows-and-posts/v3/sql/mssql.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/follows-and-posts/v3/sql/mssql.sql",
      "bytes": 94061,
      "sha256": "37dd61c5f9d7df235b928952599481e910fb4eb074b4af8e5304dfd8cbf8ab6d",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "sql/sqlite.sql",
      "format": "sql-sqlite",
      "table": null,
      "key": "datasets/follows-and-posts/v3/sql/sqlite.sql",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/follows-and-posts/v3/sql/sqlite.sql",
      "bytes": 91668,
      "sha256": "61de6327a970792d9d4624f946bddba3f92cfe125c686a76411fe90e0070338b",
      "rows": null,
      "contentType": "application/sql; charset=utf-8"
    },
    {
      "file": "prisma/seed.ts",
      "format": "prisma-seed",
      "table": null,
      "key": "datasets/follows-and-posts/v3/prisma/seed.ts",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/follows-and-posts/v3/prisma/seed.ts",
      "bytes": 168152,
      "sha256": "860ff54758999033554c5a06126c162c515a74d6f2bbf158d04aedd1236f9c98",
      "rows": null,
      "contentType": "application/typescript; charset=utf-8"
    },
    {
      "file": "django/fixtures.json",
      "format": "django-fixture",
      "table": null,
      "key": "datasets/follows-and-posts/v3/django/fixtures.json",
      "url": "https://database-sample-website.s3.eu-north-1.amazonaws.com/datasets/follows-and-posts/v3/django/fixtures.json",
      "bytes": 259613,
      "sha256": "4fc7596441ae44774ab066e666552e7c28141b51fb44d665ba83763c46096d14",
      "rows": null,
      "contentType": "application/json; charset=utf-8"
    }
  ],
  "publishedAt": 1788766611406,
  "updatedAt": 1788784058851
}
