Question
Log in to Oracle Live SQL/Oracle SQL Developer and answer the following questions: Create the following table and name it FrequentFlyer . Set FlightDate as
Log in to Oracle Live SQL/Oracle SQL Developer and answer the following questions:
- Create the following table and name it FrequentFlyer. Set FlightDate as the primary key. Use INTEGER as the data type for Fare(s):
FlightDate Destination Fare($)
-----------------------------------------------------------------------
12-JAN-91 New York 3500
21-MAR-91 London 3000
15-JUN-91 Paris 3100
28-AUG-91 Dubai 1000
23-OCT-91 Moscow 2500
05-DEC-91 Berlin 2200
- Write a query to show the running total of the price of the flights like this:
FlightDate Cumulative_Fare($)
---------------------------------------------
12-JAN-91 3500
21-MAR-91 6500
15-JUN-91 9600
28-AUG-91 10600
23-OCT-91 13100
05-DEC-91 15300
- Write a query to show the percent to total of the Fare($) column like this:
FlightDate PCT_TO_TOTAL
---------------------------------------------
12-JAN-91 0.22875817
21-MAR-91 0.19607843
15-JUN-91 0.20261438
28-AUG-91 0.06535948
23-OCT-91 0.16339869
05-DEC-91 0.14379085
Hand in:
- A screen shot of the FrequentFlyer populated with data. (2 points)
Paste your screen shot below this line
- The query in question 2 to calculate the running total (4 points)
Paste your SQL below this line
- The query in question 3 to calculate the percent to total (4 points)
Paste your SQL below this line
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