The InstantRide Driver Relationship team wants to learn how many travels each driver has done in the month of October. You need to send them the DRIVER_ID, and two calculated columns: DAY and RIDES. The DAY column is calculated using the DAY() function with the TRAVEL_START_TIME as the argument. The RIDES column is calculated by using the COUNT() function to determine the number of rides given for each day. Filter the results with the MONTH function.

Programming with Microsoft Visual Basic 2017
8th Edition
ISBN:9781337102124
Author:Diane Zak
Publisher:Diane Zak
Chapter11: Sql Server Databases
Section: Chapter Questions
Problem 10E
icon
Related questions
Question

Can someone help?

Thank you in advance

 

The InstantRide Driver Relationship team wants to learn how many travels each driver has done in the month of October. You need to send them the DRIVER_ID, and two calculated columns: DAY and RIDES. The DAY column is calculated using the DAY() function with the TRAVEL_START_TIME as the argument. The RIDES column is calculated by using the COUNT() function to determine the number of rides given for each day. Filter the results with the MONTH function.

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
Knowledge Booster
Table
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
Programming with Microsoft Visual Basic 2017
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning