Photo by Tim Johnson on Unsplash

Because not all data is stored in the same spot.

For me joins in SQL were one of those things that was difficult to understand, but is super important to understand. After some practice and this article, hopefully the confusion will subside.

Like the headline says there are at least 6 ways to join data in SQL. Previously I wrote about the foundational SQL skills to learn. You can read the article here.

Foundational SQL Know-How. Enough To Be Dangerous. | by Scott Fiene | CodeX | Medium

You can also find all the code used on my GitHub.

Let’s take a look at the tables we will be using…

Photo by Christian Wiediger on Unsplash


Enough To Be Dangerous.

I recently began learning SQL not to long ago by being thrown in to the fire. I decided that it would be a good idea dive into the fundamentals to have a more solid foundation. This is the beginning of my journey.

Creating Database and Tables

Note: I will be using PostgreSQL 13 and pgAdmin 4 to run the code. For the most part everything can be used across databases. If I use something specific to PostgreSQL then I will make it known.

Creating the Database

To create a database is simple with one line of SQL. Now is a good time to mention some SQL grammar…



About a week ago I decided I wanted do more with SQL than what I was using at work. I came across this a book from Packt Publishing called The Applied SQL Data Analytics Workshop that I decided to purchase. It seems to have everything that I was wanting in a tutorial.

At work we use Microsoft SQL Server and SQL Server Management Studio, which there is nothing wrong with in my honest opinion. However, this book utilizes PostgreSQL and pgAdmin4 so there is a little bit of a learning curve right in the beginning.

Challenge accepted!

Turns out that…

Scott Fiene

Data Nerd | Analyst and Developer | Data Visualization

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store