The answer to this question implies that you can write cross-site Data Explorer queries, but the sample query doesn't appear to do what I think it should.

    FROM [StackOverflow.Exported]..[Users] u1
    INNER JOIN [ServerFault.Exported]..[Users] u2 ON u1.Id = u2.Id

I had assumed that this would find a linked account between Stack Overflow and Server Fault, but as far as I can tell user IDs are not preserved across the Stack Exchange network. Is it possible to write a query that joins linked accounts across Stack Exchange sites?

  • 1
    You could probably match them by comparing the EmailHash column. Most users (~98% or so) use the same email address for each account. – uɐɯsO uɐɥʇɐN Oct 16 '11 at 1:40
  • 1
    Yeah, the Data Explorer doesn't have any association information, so EmailHash would be the way to go. You could get associated accounts from the API (or the profile page), and then manually enter IDs for given sites into your query, but that's rather tedious. – Tim Stone Oct 16 '11 at 6:43
  • Dynamic cross-site queries seem impossible without some kind of hideous and difficult hack... I've been trying to figure out something with EXEC and CREATE FUNCTION, but this is way beyond my limited MSSQL ability. – ABANDON STACK -- Jeremy Banks Jan 28 '12 at 23:47

Here's a query to generate the comparison of AccountIds and the resulting query, which is of course interesting to run from different base sites :-)

(This answer used to refer to EmailHashes.)

You must log in to answer this question.

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