Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Databases DeMYSTiFieD

Authors: Andy Oppel

2nd Edition

0071747990, 978-0071747998

More Books

Students also viewed these Databases questions