Frequently Asked Questions

What is this site?

Stack Exchange Data Explorer allows you to run arbitrary SQL queries on the Stack Exchange family of sites, share those queries with your friends and explore interesting queries.

Sounds interesting can you share some technical details?

Stack Exchange Data Explorer is hosted on SQL Server 2008 R2, the connections to the DB are readonly, you may not alter any tables.

The controls used are jQuery based, the grid is SlickGrid. All query results are cached, so sharing a link to a query will not result in the server going in to a tailspin. The query edit control is a slightly modified CodeMirror control, it gives up nice syntax highlighting for queries.

Sounds good, where is the source code?

Stack Exchange Data Explorer is Open Source. If you would like to help us make it more awesome, check out the code.

Do you support parameterized queries?

Yes to get it to work name your parameters like ##this##.

There is also built in support for strongly typed parameters of type string, int and float. If you name your parameter ##bob:string## it will be treated as a string, this will result in both quoting and escaping of single quotes.

How do I name and describe my queries?

A query can have a name and description, to name it lead with a comment, to describe it continue commenting, for example:

-- This is my query name 
-- This is my description
-- I can span multiple lines
SELECT 1

What is the point of logging on?

Anonymous users can initially name a query, but can not change the names of any existing queries. Additional features for logged on users:

What is the deal with magic columns?

If you alias an id column with as [Post Link] it will automatically create a link in the result set to the parent site. Similarly if you alias an id column with as [User Link] it will display a link to the user page. select top 10 * from Posts will show you how tags are done. (Magic columns for images is planned) example: most controversial posts

What is the deal with featured queries?

At the moment, admins have permission to feature interesting queries on this page, we are looking for better ways to manage the huge query list that is building up.

Why are my queries not showing up in the recent query list?

The recent, featured and popular query lists only show saved queries. If you have a query you would like to share with the community be sure to save it.

Do you offer Open Data protocol endpoints to the Stack Exchange sites?

Yes, there are links to the OData endpoints as soon as you click through on the site.

How frequently is Stack Exchange Data Explorer updated?

Data is updated monthly.

Which sites are included?

All public Stack Exchange websites are included. Sites that are in public or private beta are excluded.

Our site has just exited the public beta stage, when will it be included?

On our monthly update cycle we add any new sites that have launched.