The InstantRide User Satisfaction team requires the average and maximum number of rides users have taken so far with InstantRide. In addition, they would like to know the total number of travels. However, they need these details with the corresponding column names Average, Maximum and Total by using the AVG, MAX and SUM functions. In order to accomplish this, you will first need to create a derived table from the TRAVELS table to pass the TRAVEL_ID count to the three mathematical functions.

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

Can someone help?

Thank you in advance

 

The InstantRide User Satisfaction team requires the average and maximum number of rides users have taken so far with InstantRide. In addition, they would like to know the total number of travels. However, they need these details with the corresponding column names AverageMaximum and Total by using the AVG, MAX and SUM functions. In order to accomplish this, you will first need to create a derived table from the TRAVELS table to pass the TRAVEL_ID count to the three mathematical functions.

 

Scenario and Database Model: InstantRide
InstantRide is the new ride sharing application in the city and it has just started its operations.
With the help of the InstantRide mobile application, the users request a ride with their location.
Drivers and cars are assigned to the request; and then the driver picks up the user to ride their
requested location. Information for the users, drivers and cars are stored in the database as well as
the travel transactions.
In the USERS table, information for the users are stored with their first name, last name and email:
USER_ID
3001
3002
3003
3004
3005
3006
3007
3008
USERS Table
2001
2002
2003
USER_FIRST_NAME
2004
Jack
Ryan
Nursin
Sarah
DRIVERS Table
Bobby
Randy
Jose
Nursin
Howard
In the DRIVERS table, all the drivers in the InstantRide are stored with their name, driving license
number and check and rating information:
Walker
DRIVER ID DRIVER FIRST NAME DRIVER LAST NAME DRIVER DRIVING LICENSE ID DRIVER START_DATE DRIVER DRIVING LICENSE CHECKED DRIVER RATING
Willie
Butler
1874501
2019-09-12
Justin
Anthony
Ece
Yilmaz
1953853
USER_LAST_NAME
1735487
Hill
Collins
Yilmaz
1734747
Price
Griffin
Clark
Thomas
Yilmaz
2019-09-09
2019-09-15
2019-08-15
1
USER_EMAIL
j.hill@xmail.com
1
r.collins@xmail.com
n.atak@gmail.com
s.price@xmail.com
b.griffin@xmail.com
r.clark@xmail.com
j.thomas@xmail.com
n.yilmaz@xmail.com
1
44
4.8
3.5
0
Transcribed Image Text:Scenario and Database Model: InstantRide InstantRide is the new ride sharing application in the city and it has just started its operations. With the help of the InstantRide mobile application, the users request a ride with their location. Drivers and cars are assigned to the request; and then the driver picks up the user to ride their requested location. Information for the users, drivers and cars are stored in the database as well as the travel transactions. In the USERS table, information for the users are stored with their first name, last name and email: USER_ID 3001 3002 3003 3004 3005 3006 3007 3008 USERS Table 2001 2002 2003 USER_FIRST_NAME 2004 Jack Ryan Nursin Sarah DRIVERS Table Bobby Randy Jose Nursin Howard In the DRIVERS table, all the drivers in the InstantRide are stored with their name, driving license number and check and rating information: Walker DRIVER ID DRIVER FIRST NAME DRIVER LAST NAME DRIVER DRIVING LICENSE ID DRIVER START_DATE DRIVER DRIVING LICENSE CHECKED DRIVER RATING Willie Butler 1874501 2019-09-12 Justin Anthony Ece Yilmaz 1953853 USER_LAST_NAME 1735487 Hill Collins Yilmaz 1734747 Price Griffin Clark Thomas Yilmaz 2019-09-09 2019-09-15 2019-08-15 1 USER_EMAIL j.hill@xmail.com 1 r.collins@xmail.com n.atak@gmail.com s.price@xmail.com b.griffin@xmail.com r.clark@xmail.com j.thomas@xmail.com n.yilmaz@xmail.com 1 44 4.8 3.5 0
In the CARS table, all the cars in the InstantRide system are kept with the license plate, model
and year:
CAR ID
1001
1002
1003
1004
CARS Table
TRAVEL ID
5002
5003
5004
5005
5007
5008
5010
TRAVEL START TIME
2016-10-01 00:04:55
2015-10-01 05:57:35
2015-10-01 13:36:20
2015-10-02 0844
2015-10-02 1
2015-10-05 19:12:14
2015-10-03 16:06:36
2015-10-03 17:17:12
2015-10-05 21:16:48
2015-10-03 23:21:40
CAR PLATE
TRAVELS Table
BB-542-AB
BB-883-EE
BB-451-ZN
88-189-MM
Finally, the transactions of the rides are stored in the TRAVELS table. For each travel, start and
end time with location are stored. In addition, the involved driver, car and user are listed for each
drive. Price and discount information are also available in the database:
TRAVEL END TIME
2010-10-01 04:14:19
2015-10-01 08:12:35
2019-10-01 13:15:10
2015-10-07 01:15:28
2015-10-42 16:48:0
2015-10-01 19:25:4
2019-10-03 16:38:56
2019-10-03 17:37:42
2019-10-03 21:26:18
2019-10-03 23:39:10
TRAVEL START LOCATION
0554 York Fond
47 Church Street
>Wiad
2050 Milane
CAR MODEL
50 M
39 Road
37 The Drive
77 Mill Road
16 Church Road
TOYOTA PRIUS
TESLA MODEL 3
TOYOTA AURIS
MERCEDES E200
TRAVEL END LOCATION
Church Lane
95 W
27 Main Road
away
91 West Str
17 Stanley Road
724 Springfield Road
30 North Road
TRAVEL PRICE
15,44
20.56
13.32
16,49
11.15
14.61
4.41
25.12
25.62
DRIVER ID
3301
2002
2001
2005
2000
2001
CAR YEAR
2018
2009
2019
2019
2019
CAR ID
1005
1002
1004
1003
1009
1002
USER ID
3000
3002
3001
3007
1007
3008
3001
3005
3003
TRAVEL DISCOUNT
NULL
MAL
MEL
0.15
NUEL
0.10
014
0.25
MALL
0.20
You are assigned as the database administrator to collect and manage transactional data of the
InstantRide operations. Your main task is to create SQL scripts to help other teams to retrieve the
requested data. In the following activities, you will create the scripts, run against the database and
send the result to the corresponding teams.
Transcribed Image Text:In the CARS table, all the cars in the InstantRide system are kept with the license plate, model and year: CAR ID 1001 1002 1003 1004 CARS Table TRAVEL ID 5002 5003 5004 5005 5007 5008 5010 TRAVEL START TIME 2016-10-01 00:04:55 2015-10-01 05:57:35 2015-10-01 13:36:20 2015-10-02 0844 2015-10-02 1 2015-10-05 19:12:14 2015-10-03 16:06:36 2015-10-03 17:17:12 2015-10-05 21:16:48 2015-10-03 23:21:40 CAR PLATE TRAVELS Table BB-542-AB BB-883-EE BB-451-ZN 88-189-MM Finally, the transactions of the rides are stored in the TRAVELS table. For each travel, start and end time with location are stored. In addition, the involved driver, car and user are listed for each drive. Price and discount information are also available in the database: TRAVEL END TIME 2010-10-01 04:14:19 2015-10-01 08:12:35 2019-10-01 13:15:10 2015-10-07 01:15:28 2015-10-42 16:48:0 2015-10-01 19:25:4 2019-10-03 16:38:56 2019-10-03 17:37:42 2019-10-03 21:26:18 2019-10-03 23:39:10 TRAVEL START LOCATION 0554 York Fond 47 Church Street >Wiad 2050 Milane CAR MODEL 50 M 39 Road 37 The Drive 77 Mill Road 16 Church Road TOYOTA PRIUS TESLA MODEL 3 TOYOTA AURIS MERCEDES E200 TRAVEL END LOCATION Church Lane 95 W 27 Main Road away 91 West Str 17 Stanley Road 724 Springfield Road 30 North Road TRAVEL PRICE 15,44 20.56 13.32 16,49 11.15 14.61 4.41 25.12 25.62 DRIVER ID 3301 2002 2001 2005 2000 2001 CAR YEAR 2018 2009 2019 2019 2019 CAR ID 1005 1002 1004 1003 1009 1002 USER ID 3000 3002 3001 3007 1007 3008 3001 3005 3003 TRAVEL DISCOUNT NULL MAL MEL 0.15 NUEL 0.10 014 0.25 MALL 0.20 You are assigned as the database administrator to collect and manage transactional data of the InstantRide operations. Your main task is to create SQL scripts to help other teams to retrieve the requested data. In the following activities, you will create the scripts, run against the database and send the result to the corresponding teams.
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY