Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write the SQL QUERY to: a. List the number of bookings and the average booked price of all cottages in Halifax. b. List the names

image text in transcribed

Write the SQL QUERY to:

a. List the number of bookings and the average booked price of all cottages in Halifax.

b. List the names of all regions with the average, minimum and maximum price of their booked cottages (Regions with no cottages booked are excluded)

c. All bookings for Tourista are done through a website that charges a commission of 5% of the booked price. How much money does Tourista owe to that website for each cottage in total. List the cottage name with the total booking price and the websites commission.

Cottage Cottage_ID INT Cottage Name VARCHAR(45) Cottage-Num Rooms INT Region_Code INT | Cottage-Facility CF Num INT Region Region_Code INT Region Name VARCHAR(45) Facility_ID INT Cottage. ID INT Indexes Indexes Indexes Customer Facility Facility_ID INT Booking Booking_ID INT Booking. Date DATE Booking-Price INT Customer_ID INT Cottage-ID INT Customer ID INT Customer LName VARCHAR(45) Customer-FName VARCHAR(45) Customer. MInitial VARCHAR(5) Customer-Email VARCHAR(45) Customer-Phone VARCHAR(15) Facility-Name VARCHAR(45) Facility-IsShared BOOLEAN Indexes Indexes Indexes

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

Visual Basic6 Database Programming

Authors: John W. Fronckowiak, David J. Helda

1st Edition

0764532545, 978-0764532542

More Books

Students also viewed these Databases questions