Database System Concepts
Database System Concepts
7th Edition
ISBN: 9780078022159
Author: Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher: McGraw-Hill Education
bartleby

Concept explainers

Expert Solution & Answer
Book Icon
Chapter 3, Problem 32E

Explanation of Solution

Query:

The query for the given scenario:

SELECT distinct teaches.ID, Name FROM takes, teaches, instructor WHERE teaches.course_id = takes.course_id AND instructor.Id = teaches.Id and Grade is not NULL AND teaches.ID not in (SELECT distinct teaches.Id FROM takes, teaches WHERE teaches.course_id = takes.course_id and Grade="A");

Explanation:

  • The subquery(inner select query) finds teacher Id's who have given Grade "A" in any course that they teach...

Blurred answer
Students have asked these similar questions
Create an UPDATE query that lowers the daily rental rate of sailboat rentals by 10%.  Note: show me select * from boat showing contents of boat table after you run this update.  I should have the before from the beginning of the assignment. Search for boats for rent under $200 per day, show Boat Unique Identifier, Boat Type, Boat Length, Price per Day to rent the boat and Location (where boat is parked for pickup (please include name of marina, not just the PrimaryKey).   Create a query that shows the rentals that had different pickup and different drop off location, show Boat Unique identifier, Renter unique identifier, Start Date, End Date, Pickup Location and Drop Off Location and drop off fee of the Marina Drop Off Location(please include name of marina, not just the PrimaryKey).  From Renter and Rental table:create a query that shows Renter unique identifier, Renter name, boat unique identifier, boat name, startdate, enddate of a rental and number of days rented (name column…
Create a query that displays each instructor's schedule. Display the instructor name, course title, time slot information, for each course taught by the instructor. Also, display the building and room number where the course is taught. Sort the results in a meaningful timetable way, so that each instructor can easily see their schedules.
Create a query that SELECT all of the EMPLOYEES from the EMPLOYEE TABLE that are Mangers.   Include Employee ID first name, Lastname and Salary (Hint: Self Join)
Knowledge Booster
Background pattern image
Computer Science
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
Text book image
Oracle 12c: SQL
Computer Science
ISBN:9781305251038
Author:Joan Casteel
Publisher:Cengage Learning
Text book image
A Guide to SQL
Computer Science
ISBN:9781111527273
Author:Philip J. Pratt
Publisher:Course Technology Ptr
Text book image
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781305627482
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Text book image
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
Text book image
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:9781337102124
Author:Diane Zak
Publisher:Cengage Learning
Text book image
CMPTR
Computer Science
ISBN:9781337681872
Author:PINARD
Publisher:Cengage