_number) FROM participated, owns, person WHERE owns.driver_id = person.driver_id AND person.name = 'John Smith' AND owns.license_plate = participated.license plate; It returns the number of driver_ids that have been in an accident with the driver John Smith. It finde the names of those who have been in an accident with the driver John

A Guide to SQL
9th Edition
ISBN:9781111527273
Author:Philip J. Pratt
Publisher:Philip J. Pratt
Chapter5: Multiple-table Queries
Section: Chapter Questions
Problem 5SCG: Repeat Exercise 4, but this time use the EXISTS operator in your query.
icon
Related questions
icon
Concept explainers
Question

What is the purpose of the following query?  

 

SELECT COUNT (DISTINCT report_number)
FROM participated, owns, person
WHERE owns.driver_id
person.driver_id
AND person.name = 'John Smith'
AND owns.license_plate = participated.license plate;
It returns the number of driver_ids that have been in an accident with the driver
John Smith.
It finds the names of those who have been in an accident with the driver John
Smith.
It returns the number of driver_ids that have been registered to the name John
Smith.
O It finds the number of accidents involving a car belonging to a person named
John Smith.
Transcribed Image Text:SELECT COUNT (DISTINCT report_number) FROM participated, owns, person WHERE owns.driver_id person.driver_id AND person.name = 'John Smith' AND owns.license_plate = participated.license plate; It returns the number of driver_ids that have been in an accident with the driver John Smith. It finds the names of those who have been in an accident with the driver John Smith. It returns the number of driver_ids that have been registered to the name John Smith. O It finds the number of accidents involving a car belonging to a person named John Smith.
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Control Structure
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
A Guide to SQL
A Guide to SQL
Computer Science
ISBN:
9781111527273
Author:
Philip J. Pratt
Publisher:
Course Technology Ptr