Please write a view to list the payment statement with the city name, the total number of hotel rooms in the city with a cheap room (price less than $70), and the total cost if all cheap rooms are booked for all the hotels in the city. The output columns should be city, count, cost, sorted by the total cost from high to low.

Np Ms Office 365/Excel 2016 I Ntermed
1st Edition
ISBN:9781337508841
Author:Carey
Publisher:Carey
Chapter8: Working With Advanced Functions
Section: Chapter Questions
Problem 2.7CP
icon
Related questions
Question

Please write a
view to list the payment statement with the city name, the total number of hotel
rooms in the city with a cheap room (price less than $70), and the total cost if all cheap rooms are booked
for all the hotels in the city. The output columns should be city, count, cost, sorted by the total cost
from high to low.

[MariaDB [dreamhome]>
+▬▬▬▬▬▬
-+———·
| hotelno | hotelname
+
ch01
ch02
dc01
| fb01
|fb02
|
+-
5 rows in set (0.001 sec)
select * from Hotel;
| Omni Shoreham | London
| Phoenix Park
| Latham
| London |
| Berlin |
| Grosvenor
| Watergate
-+
501 |
fb01
601 |
fb01
701 | ch02
701 | fb01
801 | ch02
901 | dc01
1991 | ch91
1001
dc01
1001 |
fb02
1181 | che1
1101
dc01
1101 | fb02
———
[MariaDB [dreamhome]> select * from Room;
+▬▬▬▬▬▬-
| roomno | hotelno
———
———
➖➖➖➖➖➖+
| price |
-+---
| single | 19.00 |
| double | 29.00 |
| single | 10.00 |
family | 39.00 |
| double | 15.00 |
| single | 18.00 |
| single | 29.99 |
double 30.00 |
type
-+
| city 1
——-
+-
12 rows in set (0.001 sec)
| London |
| Paris
▬▬▬▬▬▬▬▬▬▬▬
| single | 58.00
| family | 59.99 |
| family | 35.00
| double | 86.00 |
-+
Transcribed Image Text:[MariaDB [dreamhome]> +▬▬▬▬▬▬ -+———· | hotelno | hotelname + ch01 ch02 dc01 | fb01 |fb02 | +- 5 rows in set (0.001 sec) select * from Hotel; | Omni Shoreham | London | Phoenix Park | Latham | London | | Berlin | | Grosvenor | Watergate -+ 501 | fb01 601 | fb01 701 | ch02 701 | fb01 801 | ch02 901 | dc01 1991 | ch91 1001 dc01 1001 | fb02 1181 | che1 1101 dc01 1101 | fb02 ——— [MariaDB [dreamhome]> select * from Room; +▬▬▬▬▬▬- | roomno | hotelno ——— ——— ➖➖➖➖➖➖+ | price | -+--- | single | 19.00 | | double | 29.00 | | single | 10.00 | family | 39.00 | | double | 15.00 | | single | 18.00 | | single | 29.99 | double 30.00 | type -+ | city 1 ——- +- 12 rows in set (0.001 sec) | London | | Paris ▬▬▬▬▬▬▬▬▬▬▬ | single | 58.00 | family | 59.99 | | family | 35.00 | double | 86.00 | -+
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps

Blurred answer
Knowledge Booster
Data Binding
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Np Ms Office 365/Excel 2016 I Ntermed
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:
9781337508841
Author:
Carey
Publisher:
Cengage