Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Ehs 2.0 Revolutionizing The Future Of Safety With Digital Technology

Authors: Tony Mudd

1st Edition

B0CN69B3HW, 979-8867463663

More Books

Students also viewed these Databases questions

Question

Discuss the key people management challenges that Dorian faced.

Answered: 1 week ago

Question

How fast should bidder managers move into the target?

Answered: 1 week ago