Consider the following schema: Person (pid integer, name: string), Observer (pid integer), Meteorologist (pid integer), Consumer (pid integer), Lives At (stretdddress string, cit string, state string, pid: integer,). Forecast (fid string, high integer, low: integer, fdate date, city string): Presents (pid integer, fld integer): Views (pid integer. fid integer): Records (pid integer, aid integer, method: string). This represents a subset of the schema that was used in Project 1. Select the valid Oracle SQL query to list the observers who recorded more than 5 observations For each observer you are to list the name of the observer, the pid value and the count of the number of observations SELEOT R.pid, P.name, COUNT (DISTINCT R.bid) FROM records R, Peraon P WHERE R.pid P.pid GROUP BY R.pid, P.name HAVING (COUNT (DISTINCT R.oid) > 5) SELECT R.pid, P.name, COUNT (DISTIN07 R.oid) FROM recorda R. Peracn P GROUP BY R. pid, P.name HAVING COUNT (R.oid)> 5 SELECT R.pid, P.name, COUNT (DISTinee R.oid) FROM records R, Ferson P WHERE R.pid P.pid AND COUNT (DISTINCT R.old> 5 GROUP BY R.pid, P.name Onone of these SELECT R.pd, P.nane. CONT IDISTIHCT R.DAd) TROM reCords R, Deraon F WHERE R.pid P.pid GROUP BY R.pid KAVING ICOUNT (DSTINCT R.oidi 5) Previous Page Neat Page Page 3 of 13

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question
Consider the following schema:
Person (pid integer, name: string);
Observer (pid integer),
Meteorologist (pid integer),
Consumer (pid integer),
Lives At (stregtdddress string, city string. ztate: string, pid. integer,):
Forecast (fid string, high: integer, low: integer, fdate, date, city. string):
Presents (pid integer, fid integer):
Views (pid integer, fid integer):
Records (nid integer, oid integer, method: string).
This represents a subset of the schema that was used in Project 1.
Select the valid Oracle SQL query to list the observers who recorded more than 5 observations. For each
observer you are to list the name of the observer, the pid value and the count of the number of observations
SELECT R.pid, P.name, COUNT (DISTINCT R.bid)
FROM records R, Peraon P
WHERE R.pid= P.pid
GROUP BY R.pid, P.name
HAVING (COUNT (DISTINCT R.oid) > 5)
SELECT R.Pid, P.name, COUNT (DISTINCT R.oid)
FROM records R, Person P
GROUP BY R.pid, P.name
HAVING COUNT (R.oid)> 5
SELECT R.pid, P.name, COUNT (DISTINCT R.oid)
FROM records R, Person
WHERE R.pid- P.pid AND COUNT (DISTINCT R.oia>5
GROUP BY R.pid, P.name
none of these
SELECT R.pid, P.name. COUNT (DISTINCT R.Did)
FROM records R, Person F
WHERE R.pid Pipid
GROUP BY Bpid
HAVING (COUNT (DESTINCT R.oid) > 5)
Previous Page
Page 3 of 13
Nest Page
hp
206x
VALUES
A ree sto wrtan Gar
VauesCentitie)
Transcribed Image Text:Consider the following schema: Person (pid integer, name: string); Observer (pid integer), Meteorologist (pid integer), Consumer (pid integer), Lives At (stregtdddress string, city string. ztate: string, pid. integer,): Forecast (fid string, high: integer, low: integer, fdate, date, city. string): Presents (pid integer, fid integer): Views (pid integer, fid integer): Records (nid integer, oid integer, method: string). This represents a subset of the schema that was used in Project 1. Select the valid Oracle SQL query to list the observers who recorded more than 5 observations. For each observer you are to list the name of the observer, the pid value and the count of the number of observations SELECT R.pid, P.name, COUNT (DISTINCT R.bid) FROM records R, Peraon P WHERE R.pid= P.pid GROUP BY R.pid, P.name HAVING (COUNT (DISTINCT R.oid) > 5) SELECT R.Pid, P.name, COUNT (DISTINCT R.oid) FROM records R, Person P GROUP BY R.pid, P.name HAVING COUNT (R.oid)> 5 SELECT R.pid, P.name, COUNT (DISTINCT R.oid) FROM records R, Person WHERE R.pid- P.pid AND COUNT (DISTINCT R.oia>5 GROUP BY R.pid, P.name none of these SELECT R.pid, P.name. COUNT (DISTINCT R.Did) FROM records R, Person F WHERE R.pid Pipid GROUP BY Bpid HAVING (COUNT (DESTINCT R.oid) > 5) Previous Page Page 3 of 13 Nest Page hp 206x VALUES A ree sto wrtan Gar VauesCentitie)
Expert Solution
steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Knowledge Booster
Complex Datatypes
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
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education