Queries in the Stack Exchange Data Explorer are usually run over one database, i.e. a single Stack Exchange site. It is possible to do a multi-site query by fully qualifying tables (including the database name), and there are some tricks like building up a dynamic SQL string which fills a temporary table when executed. There are countless examples/templates, here is one of my latest versions which stands on the shoulders of several other giants.

This morning I was checking SEDE's source code and stumbled upon this:

private static QueryResults GetMultiSiteResults(ParsedQuery parsedQuery, User currentUser, AsyncQueryRunner.AsyncResult result = null)
    var sites = Current.DB.Sites.All();
    if (parsedQuery.TargetSites == TargetSites.AllNonMetaSites)
        sites = sites.Where(s => !s.Url.Contains("meta.")).ToList();
    else if (parsedQuery.TargetSites == TargetSites.AllMetaSites)
        sites = sites.Where(s => s.Url.Contains("meta.")).ToList();
    else if (parsedQuery.TargetSites == TargetSites.AllNonMetaSitesButSO)
        sites = sites.Where(s => !s.Url.Contains("meta.") && !s.Url.Contains("stackoverflow.")).ToList();
    else if (parsedQuery.TargetSites == TargetSites.AllMetaSitesButMSE)
        sites = sites.Where(s => s.Url.Contains("meta.") && s.Url != "http://meta.stackexchange.com").ToList();

To my untrained eye, that seems like a built-in functionality for cross-site queries; it even seems to offer some kind of aggregation. It is possible to access this functionality, or is it a remnant of a long-lost feature?


1 Answer 1


It's not a lost feature. It is something that can be enabled/disabled per running instance. But it is only enabled on internal-facing instances of it that staff have access to.

The option is added to the query editing page when it is enabled.

You must log in to answer this question.

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