37
votes
Accepted
User ID and Account ID: What do they refer to?
user_id is the Id of the user on the specific site. For example, my user id on Stack Overflow is 189134. However, my user id on Community Building is 78.
The account_id, is the way to link these two ...

AndyMod
- 48.7k
28
votes
Download Stack Overflow database
There is no need to download the database.
Just use the online tools: https://data.stackexchange.com/
If you really have your heart set on downloading actual data, you can get data dumps here: https:...
27
votes
User ID and Account ID: What do they refer to?
The Id is the user's ID on that particular site. The AccountId is their user ID for the network profile, which can be plugged into stackexchange.com/users/{id} and get to a user's network profile ...
25
votes
Download Stack Overflow database
Brent Ozar here - I might have been the speaker because I do a lot of demos with the Stack Overflow databases running on Microsoft SQL Server.
If you want to follow along with the demos in SQL Server,...
22
votes
Accepted
How many new users start off asking good questions?
39.2% on 2022-07-03, out of 4.582m first posts.
This does not include deleted posts (only the first post non-deleted post). It does not include users who did not post at all. It only counts first ...
14
votes
Accepted
What is the meaning of Views attribute in the file Users.xml in the Stack Overflow data dump?
In your user profile, there's a 'x profile views' field. That would be the Views attribute you're searching for.
13
votes
Will Data Dumps continue once the company starts to "Charge AI Giants for Training Data"?
So on my tirade against AI on Meta Stack Exchange, I did a little extra digging around about what was and wasn't kosher with respect to LLM training.
In short, IANAL but I don't think that the CEO's ...
13
votes
How can I get Stack Overflow datasets related to comment ending with .csv?
If you don't want to download the datadump and don't want to fiddle with T-SQL in SEDE you can download about 500,000 comments in one go with this query. The query makes use of the PIVOT statement to ...
12
votes
Accepted
Stack Exchange DataDump - Some 7z files don't conform to 7z specification
Instead of using uTorrent the second time, I used Deluge. I was able to use the code provided at the link to decompress all of the files successfully; it took around 5 hours and 210GB of disk space ...
9
votes
How can I get Stack Overflow datasets related to comment ending with .csv?
As an alternative to data dumps, you can use the Stack Exchange Data Explorer (aka SEDE). Although due to sheer number of comments on Stack Overflow, such a query is going to be slow due to the ...
8
votes
Accepted
It appears that the DeletionDate column in the Stack Exchange data dumps available on archive.org is always empty
The Posts table (and subsequently the Posts.xml) doesn't have deleted posts, so DeletionDate will always be null.
In the SEDE instance you'll find a table PostsWithDeleted and that table does have ...
8
votes
How can I get Stack Overflow datasets related to comment ending with .csv?
Stack Exchange in general runs data dumps that are available for public consumption (list of all dumps can be found here). In particular, SO (due to the site's size) breaks data dumps into separate ...

MachavityMod
- 30.7k
7
votes
Accepted
How to collect question text before and after an edit - for recommending a suggestion when a user posts a question
If you have found PostHistory.xml you already have everything you need.
The initial body revision will be the rows with posthistorytypeid = 2 and any subsequent revision will be posthistorytypeid = ...
7
votes
Accepted
Having troubles downloading the data dump
I was just able to download the torrent from archive.org just fine. If you were having an issue please try again. We didn't receive a response from support but they may have fixed the glitch.
I'm ...
6
votes
Accepted
Searching by vote type (not by score)
Use the data explorer, for example this query.
select top 1000
postid as [Post Link]
, sum(case when votetypeid = 2 then 1 else 0 end) [upvotes]
, sum(case when votetypeid = 3 then 1 else 0 end) [...
6
votes
Accepted
How can I get the categorized reputation of a user into different tags?
The following pivot query does that for you.
Notice that I didn't do a full/correct reputation calc, just the bits based on voting and neglecting any reputation cap, offered bounties, accepted ...
6
votes
Are deleted comments included in the data dump?
Deleted comments are not present in the Datadump nor in SEDE. You can, of course, find comments that are deleted today but weren't at the time the dump was created.
Both SEDE and the Datadump are ...
6
votes
Having troubles downloading the data dump
I've asked our developers and they think it's a problem that the Internet Archive needs to fix. I wrote to them on March 30, but I haven't heard back from archive.org. It looks like the only options ...
5
votes
Accepted
Stack Overflow data dump for only a few tags
You could look into the Stack Printer.
If that doesn't meet your needs you have to write your own queries on SEDE something like this:
select distinct title, body
from posts p
inner join posttags pt ...
5
votes
How to download the answers to my questions on Stack Overflow
Add an extra join on the posts table and join on acceptedanswerid, like so:
DECLARE @UserId int = ##MyAccountID:int?3632206##
SELECT Posts.Tags,Posts.Title,Posts.Body, acc.body [accepted answer]
FROM ...
5
votes
How to collect question text before and after an edit - for recommending a suggestion when a user posts a question
You're looking for the post's revision history. The URLs for those are https://stackoverflow.com/posts/<POST ID>/revisions, and the link to them is found on any post which has been edited in the ...
4
votes
Accepted
Developer Jobs Data Archive Availability?
At the moment, it's not something we're making publicly available (and I'm not aware of any plans in that direction).
4
votes
Accepted
Retrieve list of top user tags on data.stackexchange.com
For the record, here is the query I came up with:
DECLARE @tagName nvarchar(35) = '##tagName##'
SELECT top 50
TagName,
SUM(case votes.votetypeid
WHEN 2 THEN 1 -- upvote
...
4
votes
Is it possible for users to generate a dump of their questions/answers?
I quickly created this query for you.
It simply does a union over posts, comments and edit posthistory where you're the owner. SEDE does have an export to CSV option so you click that and have a local/...
3
votes
What is the meaning of Posts.Id and how I look the corresponding post from https://www.stackoverflow.com?
There is nothing wrong with your approach. The id found in the Posts.xml belongs to the question (or answer) id found in the url of your browser.
You don't even have to worry about if the id of the ...
3
votes
Obtaining related questions for the data dump
The table PostLinks is available in both SEDE and the data-dump. This is its schema as found in Database schema documentation for the public data dump and SEDE :
PostLinks
Id primary key
CreationDate ...
2
votes
Download Stack Overflow database
Note that you can use Google BigQuery to query the quarterly dumps too.
Announcement:
https://medium.com/google-cloud/google-bigquery-public-datasets-now-include-stack-overflow-q-a-5a8a7e371b52
For ...
2
votes
Can we add an auxiliary 'numbers' table to the SEDE?
Each site has its own database. That database is recreated from scratch every Sunday. There is one extra common database (called Data), but that one holds critical system data, including users. The ...
1
vote
Get activity over time for a specific question
This is already possible (and easy) with existing tools like /posts/<questionid>/timeline. Thanks y'all!
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
data-dump × 27support × 17
data-explorer × 8
discussion × 7
feature-request × 4
statistics × 2
stack-exchange × 2
api × 2
site-analytics × 2
research × 2
data × 2
tags × 1
comments × 1
search × 1
voting × 1
deleted-questions × 1
new-users × 1
status-norepro × 1
status-review × 1
views × 1
licensing × 1
related-questions × 1
personal-data × 1
first-questions × 1
stack-overflow-jobs × 1