Write a SQL query that retrieves the names and email addresses of all students who are enrolled in at least one course in the "Computer Science" department and have a graduation year of 2022 or later. Include the course name and instructor name for each enrollment in the output. Schemas of the tables are below.   "students" table: student_id: unique identifier for the student name: name of the student email: email address of the student major: field of study for the student graduation_year: expected year of graduation for the student   "courses" table: course_id: unique identifier for the course course_name: name of the course instructor_name: name of the instructor teaching the course. department: department offering the course. course_description: description of the course   "enrollments" table: enrollment_id: unique identifier for the enrollment student_id: identifier for the student enrolled in the course. course_id: identifier for the course the student is enrolled in enrollment_date: date the student enrolled in the course grade: grade the student received in the course (Please type answer no write by hend)

Oracle 12c: SQL
3rd Edition
ISBN:9781305251038
Author:Joan Casteel
Publisher:Joan Casteel
Chapter12: Subqueries And Merge Statements
Section: Chapter Questions
Problem 19MC
icon
Related questions
Question

Write a SQL query that retrieves the names and email addresses of all students who are enrolled in at least one course in the "Computer Science" department and have a graduation year of 2022 or later. Include the course name and instructor name for each enrollment in the output. Schemas of the tables are below.

 

"students" table:

student_id: unique identifier for the student

name: name of the student

email: email address of the student

major: field of study for the student

graduation_year: expected year of graduation for the student

 

"courses" table:

course_id: unique identifier for the course

course_name: name of the course

instructor_name: name of the instructor teaching the course.

department: department offering the course.

course_description: description of the course

 

"enrollments" table:

enrollment_id: unique identifier for the enrollment

student_id: identifier for the student enrolled in the course.

course_id: identifier for the course the student is enrolled in

enrollment_date: date the student enrolled in the course

grade: grade the student received in the course

(Please type answer no write by hend)
Expert Solution
steps

Step by step

Solved in 3 steps with 7 images

Blurred answer
Knowledge Booster
Single Table
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Recommended textbooks for you
Oracle 12c: SQL
Oracle 12c: SQL
Computer Science
ISBN:
9781305251038
Author:
Joan Casteel
Publisher:
Cengage Learning
A Guide to SQL
A Guide to SQL
Computer Science
ISBN:
9781111527273
Author:
Philip J. Pratt
Publisher:
Course Technology Ptr
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781285196145
Author:
Steven, Steven Morris, Carlos Coronel, Carlos, Coronel, Carlos; Morris, Carlos Coronel and Steven Morris, Carlos Coronel; Steven Morris, Steven Morris; Carlos Coronel
Publisher:
Cengage Learning
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781305627482
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning