Background: a company came to us with a request: they had a lot of smart people who wanted to learn the basics of T-SQL in a day. Could we build an intro-to-T-SQL course that didn’t suck? Well, sure – as long as we could give it away free on the site. So here it is:
You work for a company that’s got a lot of data in Microsoft SQL Server, and you want to work with it – but you’re not sure how to start. You’re also afraid that your queries might be “bad,” and you don’t want to cause problems on someone else’s server – even when you need to work with a lot of data.
In this one-day self-paced course, we’re going to cover:
- How to write a SELECT query to get data out of one table
- How to filter the data to find just what we want
- How to sort data
- How to join multiple tables together
- How to tell if our query will be slow before we run it
- What books, videos, and web sites to use for learning more
To explain it all, we’re going to use the StackOverflow.com site, database, and their open-source Data Explorer (it’s like a web-based SSMS). You’ll learn the basics of the StackOverflow database, look at a page on StackOverflow.com, and then write a query to deliver similar data.
Head on over and get started, and let us know what you think.
8 Comments. Leave new
Working my way through it, looks good so far. The link for the next lesson at the bottom of this page seems to be linking back to itself?
https://www.brentozar.com/learn-query-sql-server-stackoverflow-database/learn-query-part-1-getting-data-select/from-getting-data-table/
And this one doesn’t have a link to the next topic at the bottom:
https://www.brentozar.com/learn-query-sql-server-stackoverflow-database/learn-query-part-1-getting-data-select/multiple-filters-andor/
Content is all good though, will be sharing this with some of our analysis team
Ron – great catches! Fixed. Thanks, and glad you like the content!
Looks like there is another one with a bad link. https://www.brentozar.com/learn-query-sql-server-stackoverflow-database/learn-query-part-1-getting-data-select/using-functions-dates/. The link on the bottom goes back to the WHERE:Multiple Filters with AND/OR topic instead of the next one.
Yep, that’s been fixed. Thanks!
Looks good, but in your list you have “How to tell if our query will be slow before we run it”. That doesn’t seem to be covered in your tutorial, just in the links for further reading. Other than that it’s a great way for folks to get a nice hands-on intro to TSQL.
I’m not seeing a valid way to access this. Clicking on the ‘Head on over..’ link leads to https://data.stackexchange.com/, and clicking on Login leads to a ‘Log In With OpenID’ page, which accepts an existing login but does not allow users to create a new one.
Doing a little research I found out that pretty much every link to create an OpenID account is now 404, and per Wikipedia at https://en.wikipedia.org/wiki/OpenID SO announced an end to OpenID support in March 2018.
You don’t have to log in with OpenID – you can use other providers like Google.