Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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,

image text in transcribed
image text in transcribed
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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Intelligent Databases Object Oriented Deductive Hypermedia Technologies

Authors: Kamran Parsaye, Mark Chignell, Setrag Khoshafian, Harry Wong

1st Edition

0471503452, 978-0471503453

More Books

Students also viewed these Databases questions

Question

Finding and scheduling appointments with new prospective clients.

Answered: 1 week ago