Like a lot of aspects of databases & analytics, table joins are pretty straight forward. You just need to be aware of some core concepts and a few tricks and tips, and then practice.
So why join tables? Well databases are typically normalised. That means the data they contain tends to be spread across lots of tables. This is done to eliminate repetitive data and make its easier to update data in databases. The downside for analysts is they are now forced to join multiple tables together to create a suitable dataset. So in today’s video I will cover the following topics
- Creating queries using the “SQL Query Editor” which is SQL Servers graphic query tool.
- Then we will move onto joining tables with T_SQL code.
- As a part of this I will talk about aliasing columns & tables why this is a good idea.
- Then I will cover off the three core types of joins.
- Inner Joins
- Outer Joins
- & Cross Joins
- Then to wrap up I will show you how to joining more than two tables.
As a FYI, joins is a topic in the “Querying Microsoft SQL Server Exam, – 70-461”. This is the first exam in the Business Intelligence Certification. In this tutorial I will cover off the Joins topic in enough detail to satisfy the exam requirements.