The InstantRide Finance team also wants to analyze travels where more than the average discount rate is applied. They want to look for any correlation between higher discount amounts against other travel characteristics. You need to create a SELECT statement which is filtered with a subquery to calculate the AVG of the TRAVEL_DISCOUNT column.

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

The InstantRide Finance team also wants to analyze travels where more than the average discount rate is applied. They want to look for any correlation between higher discount amounts against other travel characteristics. You need to create a SELECT statement which is filtered with a subquery to calculate the AVG of the TRAVEL_DISCOUNT column.

The table displayed represents travel data for a transportation service. It includes the following columns:

1. **TRAVEL_ID**: Unique identifier for each travel record.
2. **TRAVEL_START_TIME**: The date and time when the trip started.
3. **TRAVEL_END_TIME**: The date and time when the trip ended.
4. **TRAVEL_START_LOCATION**: The starting location of the trip.
5. **TRAVEL_END_LOCATION**: The destination location of the trip.
6. **TRAVEL_PRICE**: The cost of the trip in monetary terms.
7. **DRIVER_ID**: Identifier for the driver associated with the trip.
8. **CAR_ID**: Identifier for the car used during the trip.
9. **USER_ID**: Identifier for the user who booked the trip.
10. **TRAVEL_DISCOUNT**: Any discount applied to the trip price.

### Sample Data Entries:

- **Entry 1**:
  - **TRAVEL_ID**: 5001
  - **Start Time**: 2019-10-01 04:04:55
  - **End Time**: 2019-10-01 04:14:19
  - **Start Location**: 9614 York Road
  - **End Location**: 84 Church Lane
  - **Price**: 15.44
  - **Driver ID**: 2001
  - **Car ID**: 1003
  - **User ID**: 3005
  - **Discount**: NULL

- **Entry 5**:
  - **TRAVEL_ID**: 5005
  - **Start Time**: 2019-10-02 16:38:54
  - **End Time**: 2019-10-02 16:48:10
  - **Start Location**: 2 Queensway
  - **End Location**: 24 Mill Lane
  - **Price**: 11.15
  - **Driver ID**: 2001
  - **Car ID**: 1003
  - **User ID**: 3007
  - **Discount**: NULL

The table provides essential insights into the operational aspects of a transportation service, highlighting details of each ride, including time, cost, and associated personnel.
Transcribed Image Text:The table displayed represents travel data for a transportation service. It includes the following columns: 1. **TRAVEL_ID**: Unique identifier for each travel record. 2. **TRAVEL_START_TIME**: The date and time when the trip started. 3. **TRAVEL_END_TIME**: The date and time when the trip ended. 4. **TRAVEL_START_LOCATION**: The starting location of the trip. 5. **TRAVEL_END_LOCATION**: The destination location of the trip. 6. **TRAVEL_PRICE**: The cost of the trip in monetary terms. 7. **DRIVER_ID**: Identifier for the driver associated with the trip. 8. **CAR_ID**: Identifier for the car used during the trip. 9. **USER_ID**: Identifier for the user who booked the trip. 10. **TRAVEL_DISCOUNT**: Any discount applied to the trip price. ### Sample Data Entries: - **Entry 1**: - **TRAVEL_ID**: 5001 - **Start Time**: 2019-10-01 04:04:55 - **End Time**: 2019-10-01 04:14:19 - **Start Location**: 9614 York Road - **End Location**: 84 Church Lane - **Price**: 15.44 - **Driver ID**: 2001 - **Car ID**: 1003 - **User ID**: 3005 - **Discount**: NULL - **Entry 5**: - **TRAVEL_ID**: 5005 - **Start Time**: 2019-10-02 16:38:54 - **End Time**: 2019-10-02 16:48:10 - **Start Location**: 2 Queensway - **End Location**: 24 Mill Lane - **Price**: 11.15 - **Driver ID**: 2001 - **Car ID**: 1003 - **User ID**: 3007 - **Discount**: NULL The table provides essential insights into the operational aspects of a transportation service, highlighting details of each ride, including time, cost, and associated personnel.
The table provides information about drivers, detailing their personal and driving-related data.

**Table Columns:**

1. **DRIVER_ID:** Unique identifier for each driver.
   - Examples: 2001, 2002, 2003, 2004

2. **DRIVER_FIRST_NAME:** First name of the driver.
   - Examples: Willie, Justin, Anthony, Ece

3. **DRIVER_LAST_NAME:** Last name of the driver.
   - Examples: Butler, Howard, Walker, Yilmaz

4. **DRIVER_DRIVING_LICENSE_ID:** Driver's license identification number.
   - Examples: 1874501, 1953853, 1735487, 1734747

5. **DRIVER_START_DATE:** The date the driver started.
   - Format: YYYY-MM-DD
   - Examples: 2019-09-12, 2019-09-09, 2019-09-15, 2019-08-15

6. **DRIVER_DRIVING_LICENSE_CHECKED:** Indicates whether the driver's license has been checked.
   - 1 signifies the license has been checked.

7. **DRIVER_RATING:** Rating given to the driver.
   - Example ratings: 4.4, 4.8, 3.5, 0

This table can be used to track drivers' professional credentials and assess their performance over time based on the ratings.
Transcribed Image Text:The table provides information about drivers, detailing their personal and driving-related data. **Table Columns:** 1. **DRIVER_ID:** Unique identifier for each driver. - Examples: 2001, 2002, 2003, 2004 2. **DRIVER_FIRST_NAME:** First name of the driver. - Examples: Willie, Justin, Anthony, Ece 3. **DRIVER_LAST_NAME:** Last name of the driver. - Examples: Butler, Howard, Walker, Yilmaz 4. **DRIVER_DRIVING_LICENSE_ID:** Driver's license identification number. - Examples: 1874501, 1953853, 1735487, 1734747 5. **DRIVER_START_DATE:** The date the driver started. - Format: YYYY-MM-DD - Examples: 2019-09-12, 2019-09-09, 2019-09-15, 2019-08-15 6. **DRIVER_DRIVING_LICENSE_CHECKED:** Indicates whether the driver's license has been checked. - 1 signifies the license has been checked. 7. **DRIVER_RATING:** Rating given to the driver. - Example ratings: 4.4, 4.8, 3.5, 0 This table can be used to track drivers' professional credentials and assess their performance over time based on the ratings.
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
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education