Is there a way to query SO data to get the interactions (excluding votes, obviously) between two users?

For example, I'd like to get:

  • all the answers I've written to John Doe's questions;
  • all the comments I've written to John Doe's answers/questions;
  • all the comments I've written with the @JohnDoe annotation, replying to him no matter where they were (eg. other people's answers/questions);
  • viceversa (answers and comments received by a specific user);

Is this (even partially) possible, and if yes, how (forgive me if it's a known feature and I've not found it while searching)?

If it's not, do you think it could be an interesting feature to be integrated in the User Profile?

  • 2
    Read dive as div initially... – Oded May 8 '13 at 14:38
  • 3
    I think it's possible for a Data.SE query – StackExchange User May 8 '13 at 14:39
  • 3
    How good is your SQL? – AakashM May 8 '13 at 14:43
  • I guess more than your sense of humour :> – Andrea Ligios May 8 '13 at 14:46
  • 3
    I found this now in an answer to another question... I guess it could fit, but imho it would be a nice feature for the profile page :) – Andrea Ligios May 8 '13 at 14:48
  • 3
    @Oded Read read in present tense. – Kermit May 8 '13 at 15:37
  • Ahah +1 at @FreshPrinceOfSO, and great nick – Andrea Ligios May 8 '13 at 15:44

I think the best answer is AakashM's comment:

How good is your SQL.

The Stack Exchange Data Explorer (SEDE) allows you to query your favourite Stack Exchange database. From this point you can entirely customize the request you formulated in your question.

This query is already a good start if you want to look at how you can find all interaction between two users. I don't think we'll ever see an option per se in the user profile that displays such information since this site is based on content and is not about social.

Stack Overflow is not a social network

If you really want to integrate it in your user profile, it's all up to you. It's customizable. You could split the query into different sections and show them in your profile.

Enter image description here

  • What do you mean by "the user profile is customizable" ? Can I add a custom section with Data Explorer results in my profile ? – Andrea Ligios May 8 '13 at 15:11
  • Well someone correct me if i'm wrong but no. You coudn't make a script that fetch the results either since there is a captcha. But just post a link to the pre-made query. All the user have to do is fill 2 textbox and press run. – ʞunɥdɐpɐɥd May 8 '13 at 15:23
  • Ah, you mean I can add the link to my User's Profile description... I've already bookmarked that, I think it's enough... but it could be an idea for the MSO profile instead of the main one, thanks – Andrea Ligios May 8 '13 at 15:28
  • @AndreaLigios Yes. Linking it to you profil allow you profil visitors to use this query. I think a lot of users don't know about data explorer. – ʞunɥdɐpɐɥd May 8 '13 at 15:30
  • @Undo: Boy was I tempted to reject that edit on the basis of the edit summary! :-P – Martijn Pieters May 8 '13 at 16:11
  • @Undo: Your edit summary is appreciated :) Yes, we read the edit summary :P – Manishearth May 8 '13 at 16:16
  • 1
    @Manishearth Really. Huh! – Undo May 8 '13 at 16:23
  • It feels so weird typing in that little box when I want to make an edit on MSO. >2k on SO :( – Undo May 8 '13 at 16:27

You can dig into the data explorer or download the public data dump and have at it.

As for whether such a feature should be considered directly from the main sites: I think not.

Stack Overflow (and Stack Exchange) is all about the content, not the users. Aside from quenching your curiosity, I don't really see a use for such a feature that would benefit the sites.
(It could be costly to implement too - I'd be surprised if the database schema is well suited for this sort of query profile for instance.)

Moderators have tools to detect suspicious user interactions, but they are not for the general public, nor should they be.

  • good point, this is pretty much curiosity oriented. Implementing it on Comments could be expensive, but for the Answers i think it could be just a simple user ordering button aside the existing votes, activity and newest entries (of course the USERNAME information should be displayed too, while today only votes and title are). After ordering, go with dicotomic search :) – Andrea Ligios May 8 '13 at 15:00

The Stack Exchange Data Explorer Query

Have We Met ?

works like a charm for this purposes.

This is the link to the original answer from @Benjol , the creator of the query.

Feel free to vote him if you find the query useful.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .