Question
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
Returns all distinct guests with reservations
Returns guesid, FirstName, Lastname, Reservationid, propertyname
Returns all guests without reservations
Properties without reservations
Using a subquery return all reservations that have more than the average number of people
Now add the the firstname and lastname to the previous query
Using a subquery return all guests with reservations
Create stored proc that returns all personnel and then execute it
Create view that displays all properties with reservations
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.000Step 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