The Database schema documentation for the public data dump and SEDE lists ParentId among the things which are present in the PostsWithDeleted table. However, if you check the deleted answers, the ParentId is present only if the parent question is not deleted.
For example, this query returns no results. If we have no restriction that the question has to be deleted, the we get results - however, only in such cases where the question is not deleted.
- Is it intentional that the ParentId is not stored in SEDE if the question is deleted?
- Did SEDE always behave this way? Was it always the case that ParentId was present only if the question was not deleted?
In the past I thought that ParentId was stored in all cases and I used this in some queries.
- For example, the answer posted here: Are there some tools to follow deletions on this site? As one of the queries, I posted this: Deleted questions with many answers. So I wonder whether the data were organized differently at the time - or whether I have completely missed the fact that I have included a query which returns no results.
- I have found this post: When querying PostsWithDeleted, is there any way to see the delete reason of an answer? It mentions ParentId being NULL - but the post is relatively recent (March 2025).