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.
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...
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
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 2 steps
Knowledge Booster
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…
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…
Computer Science
ISBN:
9781305627482
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Principles of Information Systems (MindTap Course…
Computer Science
ISBN:
9781285867168
Author:
Ralph Stair, George Reynolds
Publisher:
Cengage Learning
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…
Computer Science
ISBN:
9781305627482
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Principles of Information Systems (MindTap Course…
Computer Science
ISBN:
9781285867168
Author:
Ralph Stair, George Reynolds
Publisher:
Cengage Learning
A Guide to SQL
Computer Science
ISBN:
9781111527273
Author:
Philip J. Pratt
Publisher:
Course Technology Ptr