Save up to $499! Grab all Python courses for $49 or all online courses we’ve ever launched for only $169. Only Feb 11-16. Happy Valentine's!
Medical Center database
1. Introduction
Non primary-foreign key JOINs
Non-equi JOINs
Non-equi self JOINs


Welcome back! In this part we'll look at some slightly less common kinds of joins.

So far, we've been joining tables through equality between the ID columns. As you'll see, this is not the only condition you can use to join two tables. Expect a few changes of table sets every few exercises.

Good luck!


Before we get into the lectures, let's explore the first four tables: patient, physician, therapy and treatment.

Here comes the first one!

Select all data from the patient table. As you can see, it consists of four columns:

  • id – the ID of a given patient,
  • email – the email of a given patient,
  • first_name – the first name of a given patient, and
  • last_name – the surname of a given patient.

Stuck? Here's a hint!


FROM patient