Question: SELECT ps . first _ name | | ' ' | | ps . last _ name AS student, cs . grade, pt . first

SELECT ps.first_name ||''|| ps.last_name AS student, cs.grade,
pt.first_name ||''|| pt.last_name AS teacher,
s.subject, c.semester, c.year
FROM people ps
JOIN students s ON ps.person_id = s.person_id
JOIN classroom_students cs ON s.student_id = cs.student_id
JOIN classrooms c ON c.classroom_id = cs.classroom_id
JOIN subjects s ON s.subject_id = c.subject_id
JOIN teachers t ON t.teacher_id = c.teacher_id
JOIN people pt ON pt.person_id = t.person_id;
(3%) Using the view you just created, write a query that outputs all the students in Megan Gray's spring, 2021 Science class. It should include the student's name and grade and should be ordered so that the students with the highest grades show up first.
(5%) Write a query that gets the full name of the teacher who teaches Science at Fayetteville-Manlius School in the spring of 2021.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!