Answered step by step
Verified Expert Solution
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,
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, 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 dateStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started