Deals Of The Week - hours only!Up to 80% off on all courses and bundles.-Close
Dictionary database
9. Summary


Incredible! Let's recap what we learned in this part.

You can join a table with itself. Each copy of the table must have an alias, and all column names must be prefixed with the corresponding table alias:

SELECT AS employee_name, AS supervisor_name
FROM employee AS emp
JOIN employee AS supervisor
  ON emp.supervisor_id =

As you may have guessed, you can combine self JOINs with other JOINs and SQL constructions.


Select all data from the person table. It has five columns:

  • id – the ID of a given person,
  • name – the name of a given person,
  • mother_id – the ID of the person's mother,
  • father_id – the ID of the person's father, and
  • year_born – a given person's year of birth.

Stuck? Here's a hint!


FROM person