Deals Of The Week - hours only!Up to 80% off on all courses and bundles.-Close
Medical Center database
1. Introduction
Non primary-foreign key JOINs
Non-equi JOINs
Non-equi self JOINs
Summary

Instruction

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!

Exercise

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,
  • FirstName – the first name of a given patient, and
  • LastName – the surname of a given patient.

Stuck? Here's a hint!

Type:

SELECT
  *
FROM Patient