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:

  1. 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

  1. 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

  1. 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:

  1. A screen shot of the FrequentFlyer populated with data. (2 points)

Paste your screen shot below this line

  1. The query in question 2 to calculate the running total (4 points)

Paste your SQL below this line

  1. 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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!