Consider the following relational schema: Course (cid, cname, dept, credit) Student (sid, sname, dept, gpa) Enroll (cid, sid, grade, semester) The meaning of these relations is straightforward and the keys are underlined. Write the following queries in SQL. a) List all the students who never got a grade above ‘C’. b) Find the number of students not enrolled in any class. c) Find name of students in EE department who took all the courses offered by CS department.

Database Systems: Design, Implementation, & Management
11th Edition
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:Steven, Steven Morris, Carlos Coronel, Carlos, Coronel, Carlos; Morris, Carlos Coronel and Steven Morris, Carlos Coronel; Steven Morris, Steven Morris; Carlos Coronel
Chapter7: Introduction To Structured Query Language (sql)
Section: Chapter Questions
Problem 65C: Write the SQL code to create the table structures for the entities shown in Figure P7.65. The...
icon
Related questions
Question

Consider the following relational schema:
Course (cid, cname, dept, credit)
Student (sid, sname, dept, gpa)
Enroll (cid, sid, grade, semester)


The meaning of these relations is straightforward and the keys are underlined. Write the
following queries in SQL.


a) List all the students who never got a grade above ‘C’.
b) Find the number of students not enrolled in any class.
c) Find name of students in EE department who took all the courses offered by CS
department.

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

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
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
Principles of Information Systems (MindTap Course…
Principles of Information Systems (MindTap Course…
Computer Science
ISBN:
9781285867168
Author:
Ralph Stair, George Reynolds
Publisher:
Cengage Learning
A Guide to SQL
A Guide to SQL
Computer Science
ISBN:
9781111527273
Author:
Philip J. Pratt
Publisher:
Course Technology Ptr