Student = (SSN, Name, Major) Course = ( CourseNumber, Quarter, CourseTitle, NumberOfUnits, RoomNumber, DayTime), where DayTime is of the form MW 1:0-2:00.

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

SQL thank you

Given the following relational database schema:

 

Student = (SSN, Name, Major)

Course = ( CourseNumber, Quarter, CourseTitle, NumberOfUnits, RoomNumber, DayTime), where DayTime is of the form MW 1:0-2:00.

Enrollment = (SSN,CourseNumber, Quarter, Grade)// Grade is Letter grade or none(Null).

 

Express the following queries using SQL statements with a minimum number of operations and tables.

 

  1. List the SSN and Name of every student who has completed the smallest number of courses(with letter grades). Note that It is possible this smallest number is zero.
  2. List the SSN of every student who only have B in every course they completed ,i.e. every grade is either Null or B
  3. List the SSN of every student who only have B and no NULL value in every course they enrolled in.
  4. List the SSN of every student who did not earn the grade B in any course
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Follow-up Questions
Read through expert solutions to related follow-up questions below.
Follow-up Question

SQL thank you

Given the following relational database schema:

 

Student = (SSN, Name, Major)

Course = ( CourseNumber, Quarter, CourseTitle, NumberOfUnits, RoomNumber, DayTime), where DayTime is of the form MW 1:0-2:00.

Enrollment = (SSN,CourseNumber, Quarter, Grade)// Grade is Letter grade or none(Null).

 

Express the following queries using SQL statements with a minimum number of operations and tables.

 

  1. List the SSN and Name of every student who has completed the smallest number of courses(with letter grades). Note that It is possible this smallest number is zero.
  2. List the SSN of every student who only have B in every course they completed ,i.e. every grade is either Null or B
  3. List the SSN of every student who only have B and no NULL value in every course they enrolled in.
  4. List the SSN of every student who did not earn the grade B in any course
Solution
Bartleby Expert
SEE SOLUTION
Knowledge Booster
Multiple 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.
Similar questions
  • SEE MORE QUESTIONS
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:
9781305627482
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
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