Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1. Find the names of guests who live in Dubai and have not reserved a double room? 2. Find the names of guests who reserved

image text in transcribed

1. Find the names of guests who live in Dubai and have not reserved a double room?

2. Find the names of guests who reserved all rooms located on the 2nd floor?

3. Find the name(s) and age(s) of the eldest guest(s)?

4. Find the average age of the guests for each city that has at least two guests living in that city. Sort the result alphabetically by the city name?

You are to use the following relational database schema to an next pages using SQL queries. answer the queries in the Guest id city age name Room number type floor Reservation Gid Rnumber day Each of the attributes is explained as follows: id: the unique ID of a guest name: the name of a guest city: the name of the city where a guest lives age: the age of a guest number: the unique number of a room type: the type of a room (single or double) floor: the floor where a room is located in Gid: the id of a guest (a foreign key referencing id) Rnumber: the number of a room ( a foreign key referencing number) day: the day in which a specific room was booked on by a specific guest

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

Step: 3

blur-text-image

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

Beginning PostgreSQL On The Cloud Simplifying Database As A Service On Cloud Platforms

Authors: Baji Shaik ,Avinash Vallarapu

1st Edition

1484234464, 978-1484234464

More Books

Students also viewed these Databases questions