-- Retrieve all 3000-level classes
select *
from   course
where  cno >= 3000 and cno < 4000;

-- Retrieve all "Lecturer" faculty
select *
from   teacher
where  rank = 'Lecturer';

-- Retrieve cprefix, cno, and title of courses taught by Graduate Teaching Assistants.
select cprefix, cno, title
from   course, teacher
where  firstname = tfname and 
       lastname = tlname and 
       rank = "Graduate Teaching Assistant";

-- Retrieve cno, and title of 4000-level courses taught by Part Time Instructors.
select cno, title
from   course, teacher
where  firstname = tfname and 
       lastname = tlname and 
       rank = "Part-Time Instructor" and
       cno >= 4000;

-- Retrieve firstname, lastname, and ranks of faculty who teach a course 
-- with the word "Data" appearing as a substring in the title of the class.
select firstname, lastname, rank
from   course, teacher
where  firstname = tfname and
       lastname = tlname and
       UPPER(title) like "%DATA%";