Skip to main content
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 ...
Andy's user avatar
  • 50.3k
36 votes

Stack Overflow is no longer providing Creative Commons Data Dumps

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 ...
Makoto's user avatar
  • 106k
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 ...
animuson's user avatar
  • 54.6k
23 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 ...
Charlieface's user avatar
21 votes

Stack Overflow is no longer providing Creative Commons Data Dumps

The same concern was brought up on the network-wide Meta site: June 2023 Data Dump is missing. Although I have answered there, I have also copied my answer here for maximum visibility: Much has been ...
Philippe's user avatar
  • 101
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.
Glorfindel's user avatar
  • 22.5k
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 ...
rene's user avatar
  • 42.2k
12 votes

How to extract all questions from Stack Overflow?

Stack Overflow controversially changed the way you obtain the Data Dump. Dumps are no longer being uploaded to the Internet Archive and the last official upload was in April 2024 containing data up ...
Thom A's user avatar
  • 94.4k
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 ...
Oleg Valter is with Ukraine's user avatar
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 ...
Machavity's user avatar
  • 31.4k
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 ...
rene's user avatar
  • 42.2k
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 = ...
rene's user avatar
  • 42.2k
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) [...
rene's user avatar
  • 42.2k
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 ...
rene's user avatar
  • 42.2k
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 ...
rene's user avatar
  • 42.2k
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 ...
Madara's Ghost's user avatar
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 ...
rene's user avatar
  • 42.2k
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).
g3rv4's user avatar
  • 19.8k
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/...
rene's user avatar
  • 42.2k
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 ...
rene's user avatar
  • 42.2k
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 ...
rene's user avatar
  • 42.2k
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 ...
rene's user avatar
  • 42.2k
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 ...
Felipe Hoffa's user avatar
  • 58.6k
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!
Leopd's user avatar
  • 42.5k

Only top scored, non community-wiki answers of a minimum length are eligible