Schema Department {dept _id, dept_name, budget) Course {course-id, title, credit
ID: 3906458 • Letter: S
Question
Schema Department {dept _id, dept_name, budget) Course {course-id, title, credits, dept_id, prerequisite Faculty {faculty_id, name, room_id, dept_id, salary) Student {student id, last_name , first_name, street, city, state, zip, birth_date, major_id, phone, student_type) Term (term id, term desc , start_date , end_date) Section {section id , course_id , section_number , term id , faculty_id , day , max_count , start time, end_time, room _id) Registration {student_id, section_id, midterm_grade, final_grade) Major fmajor_id , major _desc) Location {room id, building, room_no, capacity, room_type , room_description)Explanation / Answer
1)select courseid,sectionid,termid
from Course C
inner join Section S
on S.courseid=C.courseid
inner join Term T
on T.termid=S.termid
where TermDescription='Winter 2017'
2)update Course
set Title='Introduction to Relational Databases'
where CourseID='CIS253'
3)select sectionid,courseid,count(*) as number_of_enrollments
from Section S
inner join Registration R
on S.SectionID=R.SectionID
where courseID='MA150' and SectionID=103
group by sectionID.
4)select courseid,sectionid,(lastname + ' ' +firstname) as fullname
from Section S
inner join faculty F
on S.FacultyID=F.FacultyID
inner join Registration R
on S.SectionID=R.SectionID
inner join Student St
on R.StudentID=St.StudentID
where Name='Sen'
5)select DepartmentName,count(*) as total_no_of_instructors
from Department D
inner join Faculty F
on D.DepartmentID=F.DepartmentID
group by DepartmentName
8)select Firstname
from section S
inner join registration R
on S.SectionID=R.SectionID
inner join Student St
on R.StudentID=St.StudentID
inner join term T
on S.termID=T.termId
where TermDescription='Winter 2017' and FinalGrade='A'
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.