I'm conducting research on user engagement and satisfaction within specific tags on Stack Overflow. I'm utilizing the Stack Exchange Data Explorer (SEDE) to extract data, particularly the voting patterns of users on questions and answers.
While I can access the net vote score of questions and answers using SEDE, I'm interested in obtaining more detailed information, specifically the separate counts of upvotes and downvotes for both questions and answers. This level of granularity would provide deeper insights into user interactions and sentiment.
Is there a way to retrieve separate upvote and downvote counts for questions and answers using SEDE queries? If so, could you please provide guidance or point me in the right direction on how to modify my queries to access this information?
Any assistance or insights on this matter would be greatly appreciated. Thank you!
I've explored SEDE to analyze user engagement in specific tags on Stack Overflow. I've been unable to find a way to access separate upvote and downvote counts for questions and answers using existing queries. I'm seeking guidance on how to modify queries or access this data to gain deeper insights into user interactions. Thank you!
here is my SQL code:
SELECT
Q.*,
A.*,
U.* -- User information for all answers
FROM
(SELECT *
FROM Posts
WHERE Tags LIKE '%google-maps-api-3%'
OR Tags LIKE '%google-maps-api-3%'
AND PostTypeId = 1
AND AcceptedAnswerId IS NOT NULL) AS Q
JOIN
Posts AS A ON Q.Id = A.ParentId
JOIN
Users AS U ON A.OwnerUserId = U.Id;
Yes, you can use the
Votestable. You need to pre-aggregate it before joining. AnAPPLYis the easiest way to do this.ANDORlogic is almost certainly wrong, due to logical precedence, and needs parenthesis.The schema docs for SEDE are here.