The query that joins the three tables is used in the FROM clause instead of the name of a table or view. In the in-line query, the SELECT clause lists the columns to select. IdNum is prefixed with a table alias because it appears in two tables. The FROM clause lists the three tables for the join and assigns an alias to each table. The WHERE clause specifies the columns that join the tables. The STAFF2 and SCHEDULE2 tables have an IdNum column, which has related values in both tables. The STAFF2 and SUPERV2 tables have the IdNum and SUPID columns, which have related values in both tables.
      from (select lname, s.idnum, city, jobcat,
                   flight, date
               from proclib.schedule2 s, proclib.staff2 t, 
                    proclib.superv2 v
               where s.idnum=t.idnum and t.idnum=v.supid)