Last active
February 19, 2022 13:22
-
-
Save heyajulia/3bfe4072d3878d2dd4229a9f9695ee30 to your computer and use it in GitHub Desktop.
A SEDE query to find questions a user has answered that don't have an acccepted answer. https://data.stackexchange.com/stackoverflow/query/1559991/find-questions-a-user-has-answered-that-dont-have-an-acccepted-answer
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DECLARE @UserId int = ##UserId## | |
SELECT | |
Id AS [Post Link], | |
-- TODO: Select user's answer score as well | |
Score AS [Question Score] | |
FROM | |
Posts | |
WHERE | |
Id IN | |
( | |
-- Select the question IDs of user's answers | |
SELECT | |
ParentId | |
FROM | |
Posts | |
WHERE | |
OwnerUserId = @UserId | |
AND PostTypeId = 2 -- Answers | |
) | |
AND AcceptedAnswerId IS NULL | |
ORDER BY | |
CreationDate DESC; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment