Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write MySQL queries for the following questions (screenshots show correct results): The database is called Rentals You can use any name for a table example.

Write MySQL queries for the following questions (screenshots show correct results): The database is called "Rentals" You can use any name for a table example.

Returns all guests with reservations

image text in transcribed

Returns all distinct guests with reservations

image text in transcribed

Returns guesid, FirstName, Lastname, Reservationid, propertyname

image text in transcribed

Returns all guests without reservations

image text in transcribed

Properties without reservations

image text in transcribed

Using a subquery return all reservations that have more than the average number of people

image text in transcribed

Now add the the firstname and lastname to the previous query

image text in transcribed

Using a subquery return all guests with reservations

image text in transcribed

Create stored proc that returns all personnel and then execute it

image text in transcribed

Create view that displays all properties with reservations

image text in transcribed

guestid guest istname Tom 3 225 Kelly 216 215 11 212 13 229 Paul 15 221 Anny 17 210 19 228 Skolnik Crown Point 512 513 515 Tinley Park 531 Crown Point Crown Point 540 windsor 541 startdate 201306.1200.00200,000 201306-19 00:00:00.000 2013-03-1100:00:00.000 2013-03-25 00:00:00.000 2013051200.0000.000 201305 22 00:00:00.000 2013-05-01 00:00:00.000 2013-05-15 00:00:00.000 2013-08-2000:00.00.000 201308 27 00:00:00.000 20130404 00:00.00.000 2013-0411 0000:00,000 2013-07.2000:00:00.000 2013-0727 00:00:00.000 20130908 00:00.00.000 20130922 00:00:00,000 2013-08-10 00:00:00.000 2013-08-17 00:00:00.000 2013064030000200.000 201306-10 00:00:00,000 2013-06-22 00:00:00.000 2013-07-06 00:00:00.000 2013-07-11 00:00.00.000 2013-07-18 00:00:00.000 201308-05 00.00.00.000 201308-12 00:00:00.000 2013-11-1600:00:00.000 2013-11-23 00:00:00.000 201309-1000.00.00.000 20130917 00:00:00,000 2013-02-20 00:00:00.000 2013-02-27 00:00:00.000 201308-04 00:00.00.000 2013-08-11 00:00:00.000 2014-04-10 00.00.00.000 2014-04-17 00:00:00.000 201305-20 00:00:00.000 201305-27000000.000

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

Advances In Spatial And Temporal Databases 10th International Symposium Sstd 2007 Boston Ma Usa July 2007 Proceedings Lncs 4605

Authors: Dimitris Papadias ,Donghui Zhang ,George Kollios

2007th Edition

3540735399, 978-3540735397

More Books

Students also viewed these Databases questions

Question

25.0 m C B A 52.0 m 65.0 m

Answered: 1 week ago