Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

undefined Spring 2021 DreamHome database schema (textbook, pp. 111) Branch(branchNo, street, city, postcode) Staff(staffNo, fname, Iname, sex, position, DOB, salary, branchNo) Client(clientNo, fname, Iname, telNo,

image text in transcribedundefinedimage text in transcribedimage text in transcribed

Spring 2021 DreamHome database schema (textbook, pp. 111) Branch(branchNo, street, city, postcode) Staff(staffNo, fname, Iname, sex, position, DOB, salary, branchNo) Client(clientNo, fname, Iname, telNo, prefType, maxRent) Private Owner(ownerNo, fname, Iname, address, telNo) Registration(clientNo, branchNo, staffNo, dateJoined) Property For Rent (property No, street, city, postcode, type, rooms, rent, ownerNo, branchNo) Viewing clientNo, propertyNo, viewDate, comments) CS306 Spring 2021 HotelReservation db schma (textbook pp. 118) Hotel(hotelNo, hotelName, city) Room(roomNo, hotelNo, type, price) Booking (hotelNo, guestNo, dateFrom, date To, roomNo) Guest(guestNo, guestName, guestAddress) CS 306 Spring 2021 Homework 2 These are more complicated queries. Work on Practice Quizzes first. For any problems requiring multiple tables, use Join EXPLICITLY, do NOT follow the textbook examples. DreamHome db 1. Write a query to display the branch numbers and the number of properties managed by each branch. - SELECT b. branch No 2. Write a query to list the client names, client phone numbers and the dates they registered 3. Write a query to list the client numbers and total numbers of properties that match the client preferred type. Hotel Reservation db 4. Write a query to display the total number of single rooms. Label the heading Total Single. 5. Write a query to list the guest names and the last booking check-in date. 6. Write a query to list hotel names and their highest room price. Only need hotels located in London. 7. Write a query to display the guests' names that their bookings have no check- out date

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

Datacasting How To Stream Databases Over The Internet

Authors: Jessica Keyes

1st Edition

007034678X, 978-0070346789

More Books

Students also viewed these Databases questions

Question

What is the number-one rule in making an investor presentation?

Answered: 1 week ago

Question

Why does sin 2x + cos2x =1 ?

Answered: 1 week ago

Question

What are DNA and RNA and what is the difference between them?

Answered: 1 week ago

Question

Why do living creatures die? Can it be proved that they are reborn?

Answered: 1 week ago

Question

What does Processing of an OLAP Cube accomplish?

Answered: 1 week ago