
Let's start off on the right foot and begin with writing your very first SQL query. With it you learn the first keywords of a SQL query
If you want to get some background details on databases and SQL in general first, have a look at the resources in this section. There you will also find some more details on the practice tool we'll use in this course to write and execute queries.
With SQL you can select data from tables in relational databases. Most of these tables include multiple columns. Some of them are of interest to you, others likely aren't. In this lesson you learn how to selectively pick only those columns you are interested in.
At its core SQL is quite easy, it requires a bit of practice though. Just like learning any other "language". In this practice session you will learn how to create a phone list of all customers in the data base.
In this lesson we walk through the practice task and discuss a possible solution. Please comment with any questions you may have!
Aside from picking columns, filtering the rows according to your needs is the next big step. In this lesson you learn about the filtering function and how to use it.
Often you need to filter for multiple conditions. In this lesson you will learn how to do that and how to combine different conditions in meaningful ways.
In this session you will create two lists using different filters.
In this lesson we walk through the practice task and discuss a possible solution. Please comment with any questions you may have!
If the prior tasks where too easy for you, try these. Feel free to test as many queries as needed. The database is small and should return your results very quickly. The tool will also provide you with error messages, in case your query needs some adjustments.
Start developing some healthy skepticism towards your results though. Do they appear reasonable? Or could there be a mistake in the query logic?
In this lesson we walk through the practice task and discuss a possible solution. Please comment with any questions you may have!
The operators IN and NOT IN can be very useful to shorten some queries and eliminate typical typing mistakes in SQL queries.
If you want to limit your results based on whether certain values are smaller or greater than a set number, you can use the commands for greater than and less than.
In this lesson you learn how to quickly get a list of all unique values in a column and how to get a list of all unique combinations of two or more columns.
In this lesson you will learn how to count the number of entries or records in a table, the number of values in a column and also how to find out how many unique values are in a column.
One of the most powerful functions of SQL is the grouping of results. In this lesson you learn why and how you can take advantage of this.
Practice counting and grouping with three quick practice tasks.
In this lesson we walk through the practice task and discuss a possible solution. Please comment with any questions you may have!
You results can be sorted both numerically and alphabetically. In this lesson you learn how to order them according to different columns in an ascending and descending order.
SQL is pretty straight forward and easy to learn. Even if the syntax appears to be rigid, you do have some flexibility in how you write your queries. In this lesson you learn some of the finer points in writing good SQL queries.
A quick summary of all you have learned so far, you can use it as a reference sheet for the up coming lessons.
SQL is the preferred query language for relational databases. But what are these databases anyways? In this lesson you will learn a bit about the theory of relational data bases to prepare for joining different tables in your upcoming queries.
Often tables are combined with an INNER JOIN. In this lesson you will learn how to perform an INNER JOIN and what it takes to adjust your prior queries for this.
In this task, you will be asked to combine two tables via an inner join to pull data from both of them simultaneously.
In this lesson we walk through the practice task and discuss a possible solution. Please comment with any questions you may have!
You can join more than one table in the same query. In this lesson I will show you how this works.
Two tasks to practice joining multiple tables.
In this lesson we walk through the practice task and discuss a possible solution. Please comment with any questions you may have!
In this lesson you learn
Here you have two tasks to practice outer joins. If you are not sure when to use an outer and when an inner join, try performing both queries in separate browser tabs and compare the results!
In this lesson we walk through the practice task and discuss a possible solution. Please comment with any questions you may have!
A brief summary of all you have learned in this section.
When you aggregate data in your tables, it often makes sense to sum metrics. In this lesson you learn how to do this and what you have to look out for.
Practice the summing of data.
In this lesson we walk through the practice task and discuss a possible solution. Please comment with any questions you may have!
Aside from counting and summing, there are three more useful aggregate functions that work similarly and can be used in combination with grouping. In this lesson you will learn how to calculate the average and how to find the lowest and highest values in individual columns.
A summary of all SQL learnings in this section.
Oftentimes you find data points like revenue, cost, order numbers and more in your data base. It is rather easy to calculate things like order volumes and profit. In this lesson you will learn how to calculate across columns and tables and what you should keep in mind when doing so.
Filtering for aggregates is a bit trickier than to filter on values in the source tables. For this you have to use the command HAVING. This lesson will cover how to do so.
Congratulations. You learned most of the basics of SQL and I hope you have enjoyed the journey so far. If you are still uncertain, it is just a matter of practice. Feel free to use the tool as much as you want. If you want more practice tasks, just leave a comment.
To finish this course off, I included a few sessions with tips on optimizing your SQL queries. It will make writing and working with them a bit easier.
No matter if you work in marketing, sales or finance, a solid understanding of data and the ability to query databases is a huge plus for your career. The first step to pulling your own data is an understand of SQL, the language used to query most data bases.
It doesn't matter if your company uses MySQL, TeraData, Microsoft SQL Server, Oracle oder MS Access. SQL is a standardized language, can be used to get data out of almost all relational databases.
What will you learn in this course?
This course is a quick and easy step by step guide to writing SQL queries to pull your own data. You learn all key functions of SQL and get a basic understanding of how relational databases work. Plenty of practice sessions will allow you to write your own queries and learn hands on. This way you will feel comfortable in applying the learned material to your day to day problems at work.
Is this course right for you?
If you want to learn solid skills that will improve your career prospects, then this is probably the course for you. Individuals that know their way around data bases, can query their own data sets and analyze them are in high demand in. If your current or your dream employer collects data of any kind? Then you should learn how to use this data.
If you run your own business, it is even more critical to get to your data and make sense of it. Even the databases of websites, online shops and payment systems can be queried with SQL. Get this data, format it and analyze to take the right decisions for your business success.
Course structure
The course is structured in easy steps that allow you to learn one step at a time. Practice sessions and quick quizzes will allow you to write your own queries in an easy to use online tool. No installation or setup required. In fact, you will write your first SQL query in the very first lesson. With each lesson the queries get more complicated and built on the learnings of the prior lessons.Begin today, learn how to write your first query and start your journey to becoming a data expert!