Introduction and Setting Up

In this part of Learn T-SQL with the StackOverflow Database, we’re going to cover how to get data out of SQL Server. is a popular programmer Q&A site where you post questions, and somebody else does all the hard work of figuring out the answer.

They store data in Microsoft SQL Server, and they graciously provide a site where you can query the database. It’s not the live production copy – you’re querying a restored copy that’s a few days old, and sensitive stuff like emails and passwords have been removed.

Go to and click Log In at the top to set up your free account. You can technically do all of these exercises without an account, but you’re probably going to want to go back and see your query history, and to do that you’ll need a free account.

After you’ve logged in, go to the home page and click Stack Overflow. You’re now looking at a list of queries that other people have written against the Stack databases. As you click around in here, the queries will look intimidating – no worries, we’re going to get you started from the ground up.

Let’s get going with your first lesson.