Question: Consider the following schema: Person (pid: integer, name: string); Observer (pid integer). Meteorologist (pid integer); Consumer (pid integer); Lives_At (streetdddress: string, city string, state: string,

 Consider the following schema: Person (pid: integer, name: string); Observer (pid
integer). Meteorologist (pid integer); Consumer (pid integer); Lives_At (streetdddress: string, city string,

Consider the following schema: Person (pid: integer, name: string); Observer (pid integer). Meteorologist (pid integer); Consumer (pid integer); Lives_At (streetdddress: string, city string, state: string, pid: integer.), Forecast (tid: string, high integer, low integer, fdate: date, city: string); Presents (pid integer, fid: integer); Views (rid: integer, fid integer), Records (pid integer, oid:integer, mothodi 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 none of these SELECT R.pid, P.name, COUNT (DISTINCT R.oid) FROM records R, Person P WHERE R.pid P.pid AND COUNT (DISTINCT Rooid) > 5 GROUP BY R.pid, P.name SELECT R.pid, P.name, COUNT (DISTINCT R.oid) FROM records R, Person P WHERE R.pid = p.pid GROUP BY R.pid HAVING (COUNT (DISTINCT R.oid) > 5) SELECT R.pid, P.name, COUNT (DISTINCT Rooid) FROM records R, Person. 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

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!