SQL Assignment The schema of these relations is Courses (course, credits, days,
ID: 3584975 • Letter: S
Question
SQL Assignment
The schema of these relations is Courses (course, credits, days, time, room, title, prof, dept) Profs (pname, given, office, ext, email1) Students(name, given, linux, major, email) Enroll (linux, course, grade) Coreq (lect, lab) Dayx (days, dayo, day, jour) - ex: MWF I Mon lundi All attributes are CHARACTER, except for credits, grade, dayo and ext, which are integer. Primary keys are underlined. · SQL statements, here is an outline of the various clauses of SELECT. You can type any sql statement in psql, they can cover several lines, and end with a semicolon (). Up-arrow recalls previous lines. In this outline, keywords are bold, optional things are in [square brackets] and one or more things in (curly brackets) o select (list of attributes and aggregate functions]) o from tablenames ° [where {conditions} ] [group by o [having (conditions) ]] o order by (column (S)) [descending]Explanation / Answer
Query 1
select course,title from Course where room in (select room from Course where prof='Jensen')
Query 2
select name from Students where linux in (select linux from Enroll where course in (select course from Courses where prof in (select prof from Courses where course='CSC111')))
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.