1. Specify the following queries in SQL on the database schema in Figure 1.2 (below). Retrieve the names and major departments of all students who have a grade of A in all their courses. b. 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
100%
1. Specify the following queries in SQL on the
database schema in Figure 1.2 (below).
Retrieve the names and major
а.
departments of all students who
have a grade of A in all their
courses.
b. Retrieve the names and major
departments of all students who
do not have a grade of A in any of
their courses.
STUDENT
Name Student_number Class
Major
Smith
17
CS
Brown
CS
COURSE
Course name
Course number Credit hours Department
Intro to Computer Science
CS1310
4
CS
Data Structures
Discrete Mathematics
Database
CS3320
4
CS
MATH2410
MATH
CS3380
3
CS
SECTION
Section_identifier Course number
MATH2410
Semester
Year
Instructor
85
Fall
07
King
92
CS1310
Fall
07
Anderson
Spring
Knuth
CS3320
MATH24 10
CS1310
102
08
Chang
Anderson
112
Fall
08
119
Fall
08
135
CS3380
Fall
08
Stone
GRADE REPORT
Student_number
Section_identifier
Grade
17
112
17
119
A
92
A
102
B
135
A
PREREQUISITE
Course number
CS3380
Prerequisite number
CS3320
Figure 1.2
A database that stores
student and course
Information.
MATH2410
CS1310
CS3380
CS3320
Transcribed Image Text:1. Specify the following queries in SQL on the database schema in Figure 1.2 (below). Retrieve the names and major а. departments of all students who have a grade of A in all their courses. b. Retrieve the names and major departments of all students who do not have a grade of A in any of their courses. STUDENT Name Student_number Class Major Smith 17 CS Brown CS COURSE Course name Course number Credit hours Department Intro to Computer Science CS1310 4 CS Data Structures Discrete Mathematics Database CS3320 4 CS MATH2410 MATH CS3380 3 CS SECTION Section_identifier Course number MATH2410 Semester Year Instructor 85 Fall 07 King 92 CS1310 Fall 07 Anderson Spring Knuth CS3320 MATH24 10 CS1310 102 08 Chang Anderson 112 Fall 08 119 Fall 08 135 CS3380 Fall 08 Stone GRADE REPORT Student_number Section_identifier Grade 17 112 17 119 A 92 A 102 B 135 A PREREQUISITE Course number CS3380 Prerequisite number CS3320 Figure 1.2 A database that stores student and course Information. MATH2410 CS1310 CS3380 CS3320
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 4 images

Blurred answer
Knowledge Booster
SQL Query
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.
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