Answered step by step
Verified Expert Solution
Question
1 Approved Answer
WITHOUT USING CHATGPT - - - NEED HELP GETTING THE DISCOUNT TO WORK RIGHT - - - - Scenario and Database Model: InstantRide InstantRide is
WITHOUT USING CHATGPTNEED HELP GETTING THE DISCOUNT TO WORK RIGHTScenario 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: USERS Table USERS Table In the DRIVERS table, all the drivers in the InstantRide are stored with their name, driving license number and check and rating information: DRIVERS Table DRIVERS Table In the CARS table, all the cars in the InstantRide system are kept with the license plate, model and year: CARS Table CARS Table 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: TRAVELS Table TRAVELS Table 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. Task : The Finance team wants to calculate a VAT on the amount of the stay reservations in the database. However, the team wants to calculate the VAT after the discounts are applied on the prices. In addition, it is important to remember if there is no discountoffers then the value is NULL in the TRAVELS table. Create a procedure called VATCalculator to calculate the VAT amount and return with the corresponding travel ID In addition, execute the procedure to account for NULL values and send the respective result to the team. The VAT value should be rounded to decimals. Remember to redefine the MYSQL delimiter ; when creating the procedure. This will prevent the commands from executing separately. Task : Create a procedure to calculate the VAT. Test Feedback: Status: FAILED! Check: Test: Create a procedure to calculate the VAT Reason: Expected: TRAVELID VAT Found: TRAVELID VAT Error : AssertionError Timestamp: ::
WITHOUT USING CHATGPTNEED HELP GETTING THE DISCOUNT TO WORK RIGHTScenario 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:
USERS Table
USERS Table
In the DRIVERS table, all the drivers in the InstantRide are stored with their name, driving license number and check and rating information:
DRIVERS Table
DRIVERS Table
In the CARS table, all the cars in the InstantRide system are kept with the license plate, model and year:
CARS Table
CARS Table
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:
TRAVELS Table
TRAVELS Table
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.
Task :
The Finance team wants to calculate a VAT on the amount of the stay reservations in the database. However, the team wants to calculate the VAT after the discounts are applied on the prices. In addition, it is important to remember if there is no discountoffers then the value is NULL in the TRAVELS table. Create a procedure called VATCalculator to calculate the VAT amount and return with the corresponding travel ID In addition, execute the procedure to account for NULL values and send the respective result to the team. The VAT value should be rounded to decimals.
Remember to redefine the MYSQL delimiter ; when creating the procedure. This will prevent the commands from executing separately.
Task : Create a procedure to calculate the VAT.
Test Feedback:
Status: FAILED!
Check:
Test: Create a procedure to calculate the VAT
Reason: Expected:
TRAVELID VAT
Found:
TRAVELID VAT
Error : AssertionError
Timestamp: ::
Step 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