Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Database Problem 4: SQL Queries (30 pts) Consider the following relations. The primary keys are underlined while the foreign keys are in italic. Hotel (HNum,

image text in transcribed

image text in transcribed

Database

Problem 4: SQL Queries (30 pts) Consider the following relations. The primary keys are underlined while the foreign keys are in italic. Hotel (HNum, Hname, Location) Room (RNum, HNum, Type, View, Price) Booking (ID, HNum, GHum, RNum, DateFrom, Date To) Guest (GNum, Fname, Lname, Gender, DOB, City) Write the corresponding SQL queries for the below questions 6. Write an SQL query to show all hotels along with the number of booking in there. Page 7 of 8 CSCI335 Fina 2021 - 2022 7. List the name of guests whose last name contains 'a' 8. List the names of hotels who has no booking in them 9. Find the room number with no booking. 10. Find the highest price and average price of room

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

Introductory Relational Database Design For Business With Microsoft Access

Authors: Jonathan Eckstein, Bonnie R. Schultz

1st Edition

1119329418, 978-1119329411

More Books

Students also viewed these Databases questions