Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write and execute SQL statement(s) to complete each of the following tasks. Copy your SQL statements into the assignment document. Secondly, include the screenshots of

image text in transcribed
image text in transcribed
image text in transcribed
Write and execute SQL statement(s) to complete each of the following tasks. Copy your SQL statements into the assignment document. Secondly, include the screenshots of results obtained by executing those statements on the DBMS. Typing the results of SQL statements is NOT acceptable.
List the names and addresses of all Australian guests, alphabetically ordered by name.
What would be the total revenue per night from all 'Studio' rooms if all rooms are occupied and booked at their advertised rate?
How many bookings fall in October 2019?
List names of guests who have booked a room at the Beachside Apartments on 13th October 2019.
List the room numbers that are currently occupied at Holiday Inn Express.
List the hotel names and the total number of rooms in each hotel in Indonesia.
Create a 'view' containing the names of all hotels worldwide and their average room rate. Sort the view by increasing price. Finally display the view.
Find out how many children are accompanying Boris Johnson in each of his stays? Show the hotel names and corresponding number of children.
Find phone numbers of all the guests who have or had a booking at Crown Towers in room number 215.
Information about reservations older than 3 years are unlikely to be used in future. For performance reasons, such historical data can be moved to separate archive tables. Write SQL statements to create one or more archival tables with the same structure as original table(s). Using INSERT statement, copy the records of all historical bookings (that ended THREE years before today) from the original tables to the archive tables. Then delete all archived data from the original table(s).
Note: You can recover the original data by reimporting the sql file.
[1.5 marks 10]
. DELL ef D elhi Beli ENERT TO UTE LEITE SE PORIOL TINTO . HTL 1 . . . DELL DELL

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

Microsoft SQL Server 2012 Unleashed

Authors: Ray Rankins, Paul Bertucci

1st Edition

0133408507, 9780133408508

More Books

Students also viewed these Databases questions

Question

is particularly relevant to these issues.)

Answered: 1 week ago

Question

2. How will you handle the situation?

Answered: 1 week ago

Question

3. Write a policy statement to address these issues.

Answered: 1 week ago