/* To simulate FULL JOIN in SQLite, perform a left join and another left join, */
/* and UNION the 2 results */

select s.lname as s_first, s.fname as s_last, c.course_id, i.lname, i.fname
from student s
LEFT join class c
     on s.ssn = c.stu_ssn
LEFT JOIN instructor i
     on i.ssn = c.inst_ssn

UNION

select null, null, c.course_id, i.lname, i.fname
from instructor i
LEFT join class c
     on i.ssn = c.inst_ssn
where c.course_id is null

ORDER BY 3 desc