Question: Q 3 : Nested Query ( 5 pt ) : Given the same relational schema above. You should only use nested query: NationalPark ( pid

Q3: Nested Query(5 pt): Given the same relational schema above. You should only use nested query:
NationalPark(pid, name, state, year,rating, entry_fee)
BelongTo(pid, tid ?(), loc)
Hiking(t.tid, name, length, rating)
LocIn(d,cid,loc)
Campsite(cid, name, fee, rating)
Answer the nested SQL query for the following questions:
(a) Juan plans to visit all national parks in Texas, he plans to only visit the parks that have a trail with a rating greater than 4, and ALL the campsites are cheap enough (less than $10 per night) so that he can afford them. Could you help him figure it out (You should return a table that consists of park name: (name))
(b) Jose also plans to visit national parks after this semester. He is Juan's best friend. He plans to visit the national parks where ALL the trails have a rating greater than 3. Juan and Jose plan to meet at some national parks to hike a trail together. Is it even possible? Please write an SQL query that can verify your answer and explain it.
 Q3: Nested Query(5 pt): Given the same relational schema above. You

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!