4.Specify the following queries in SQL on the database schema of figure a.Retrieve the names of all senior students majoring in ‘CS’ (computer science). b Retrieve the names of all courses taught by Professor King in 1998 and 1999. c.For each section taught by Professor King, retrieve the course number, semester, year, and number of students who took the section. d.Retrieve the name and transcript of each senior student (Class = 5) majoring in CS. A transcript includes course name, course number, credit hours, semester, year, and grade for each course completed by the student. e.Retrieve the names and major departments of all straight-A students (students who have a grade of A in all their courses). f.Retrieve the names and major departments of all students who do not have a grade of A in any of their courses

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

4.Specify the following queries in SQL on the database schema of figure

a.Retrieve the names of all senior students majoring in ‘CS’ (computer science).

b Retrieve the names of all courses taught by Professor King in 1998 and 1999.

c.For each section taught by Professor King, retrieve the course number, semester, year, and number of students who took the section.

d.Retrieve the name and transcript of each senior student (Class = 5) majoring in CS. A transcript includes course name, course number, credit hours, semester, year, and grade for each course completed by the student.

e.Retrieve the names and major departments of all straight-A students (students who have a grade of A in all their courses).

f.Retrieve the names and major departments of all students who do not have a grade of A in any of their courses

 

STUDENT Name StudentNumber Class
Major
Smith
17
1
cs
Brown
8
2
CS
CourseNumber CreditHours Department
Cs
COURSE
CourseName
Intro to Computer Science
Data Structures
Discrete Mathematics
CS1310
4
CS3320
4
CS
MATH2410
3
МАТH
Database
CS3380
3
CS
SECTION Sectionldentifier CourseNumber
Semester
Year
Instructor
85
МАТН2410
Fall
Fall
Spring
98
King
Anderson
Knuth
92
CS1310
98
99
99
102
CS3320
112
МАТН2410
Fall
Chang
Anderson
119
CS1310
Fall
99
99
135
CS3380
Fall
Stone
GRADE_REPORT StudentNumber
Sectionldentifier
Grade
17
112
B
17
119
C
8
85
A
8.
92
A
8
102
B
8
135
A
PREREQUISITE
CourseNumber PrerequisiteNumber
CS3380
CS3320
CS3380
МАТН2410
CS3320
CS1310
Transcribed Image Text:STUDENT Name StudentNumber Class Major Smith 17 1 cs Brown 8 2 CS CourseNumber CreditHours Department Cs COURSE CourseName Intro to Computer Science Data Structures Discrete Mathematics CS1310 4 CS3320 4 CS MATH2410 3 МАТH Database CS3380 3 CS SECTION Sectionldentifier CourseNumber Semester Year Instructor 85 МАТН2410 Fall Fall Spring 98 King Anderson Knuth 92 CS1310 98 99 99 102 CS3320 112 МАТН2410 Fall Chang Anderson 119 CS1310 Fall 99 99 135 CS3380 Fall Stone GRADE_REPORT StudentNumber Sectionldentifier Grade 17 112 B 17 119 C 8 85 A 8. 92 A 8 102 B 8 135 A PREREQUISITE CourseNumber PrerequisiteNumber CS3380 CS3320 CS3380 МАТН2410 CS3320 CS1310
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Similar questions
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education