Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 158 Stack Exchange communities.

What is meta?
Here's how it works:
  1. Any Stack Exchange user can ask a question
  2. The community provides support, votes on ideas, and reports bugs
  3. Your voice helps shape the way Stack Exchange operates

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?

share|improve this question
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
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. – 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.)

share|improve this answer

You must log in to answer this question.

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