Great! Nothing stops us from joinging three or more tables in this manner.
So far, you've worked with the
patient_id column. As it turns out, this is actually a foreign key of the
therapy table. Suppose that in our previous query, we would like to show the treatment type that has been recommended for each patient instead of showing their ID.
In that case, we need to add another
physician.id AS physician_id,
ON patient.email = physician.email
ON patient.id = patient_id
WHERE experience > 5