datasets real and made-up data to practise on
Datasets
Data for the Playground, Database Lab and Performance Lab. Pick one and open its files.
A fictional programming Q&A site: questions and answers with HTML bodies, tags and votes.
300 questions3 tablesJan 2023 – Jun 2025
what to watch for
Tricky rows
- Bodies are HTML with escaped code (<, >, &)741 rows
- All of a question’s tags in one string: "<python><pandas>"300 rows
- Posts whose owner account was deleted (owner_user_id empty)18 rows
- Questions with no answers101 rows
files
Open a file to see what one row means, its columns and a preview. Open in Playground starts a new file there with code that loads it.
users635 rows · 5 columns · CSV
One user who asked or answered a question here.
In your code: data/users.csv
- user_id
User ID
- display_name
Invented display name
- reputation
Reputation points
- created_at
Account created, UTC
- location
Free-text location
questions300 rows · 13 columns · CSV
One question.
In your code: data/questions.csv
- question_id
Question ID
- owner_user_id
Who asked; empty if the account was deleted
- title
Title
- body
HTML body
- tags
Tags as "<python><pandas>"
- score
Up votes minus down votes
- view_count
Views
- answer_count
Answers
- accepted_answer_id
The accepted answer, if any
- created_at
Asked, UTC
- closed_at
Closed, UTC
- closed_reason
Why it was closed
- last_activity_at
Last activity, UTC
answers441 rows · 7 columns · CSV
One answer to a question.
In your code: data/answers.csv
- answer_id
Answer ID
- question_id
Question
- owner_user_id
Who answered; empty if deleted
- body
HTML body
- score
Score
- created_at
Answered, UTC
- is_accepted
1 for the accepted answer
data/Posts.xml741 records · XML
One question.
In your code: data/Posts.xml
relationships
How to join these tables. Left column matches the right column.
- questions.owner_user_id → users.user_id
- answers.question_id → questions.question_id
- answers.owner_user_id → users.user_id