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.
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.
Stack Exchange Data Explorer is Open Source. If you would like to help us make it more awesome, check out the code.
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.
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
Anonymous users can initially name a query, but can not change the names of any existing queries. Additional features for logged on users:
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
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.
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.
Yes, there are links to the OData endpoints as soon as you click through on the site.
Data is updated monthly.
All public Stack Exchange websites are included. Sites that are in public or private beta are excluded.
On our monthly update cycle we add any new sites that have launched.