1. Create the following table. dbo.Flights Columns FlightID (PK, int, not null) FlightDateTime (datetime, null) FlightDepartureCity...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
1. Create the following table. dbo.Flights Columns FlightID (PK, int, not null) FlightDateTime (datetime, null) FlightDepartureCity (varchar(50), null) FlightDestinationCity (varchar(50), nul Ontime (int, null) a. There should be a Primary Key on FlightID b. There should be an Identity Constraint on FlightID (100,1) a. 100 = Seed b. 1 Increment = 2. Run the following script to Insert Data into the table. INSERT INTO dbo. Flights (FlightDateTime, Flight DepartureCity, Flight DestinationCity, Ontime) SELECT '1/1/2012', 'Dallas-Texas', 'L.A.', 1 UNION SELECT '1/2/2012', 'Austin-Texas', 'New York', 1 UNION SELECT 1/3/2012', 'Houston-Texas', 'New Jersy', 0 UNION SELECT 1/4/2012', 'San Antonio- Texas', 'Mesquite', 1 UNION SELECT 1/5/2012', 'Lewisville- Texas', 'Albany', 0 SELECT UNION 1/6/2012','Orlando- Florida', 'Atlanta', 1 UNION SELECT 1/7/2012', 'Chicago- Illinois', 'Oklahoma City', 1 UNION SELECT 1/8/2012', 'New Orleans- Louisiana', 'Memphis',0 UNION SELECT 1/9/2012', 'Miami- Florida', 'Charlotte', 1 UNION SELECT '1/10/2012', 'Sacramento- California', 'San Francisco', 1 3. Create and set a Variable equal to the number of Flights that were late. 4. Multiply that amount by the amount lost per late flight ($1,029) and store the amount in another variable. 5. Take the total amount lost (#4) and subtract it from Total profit ($45,000) and store that number in a variable. 6. Find out the Earliest FlightDate and add 10 years to it and store it in a variable. 7. Find out the day of the week for the Latest FlightDate and store it in a variable. 8. Create a table variable with Departure City and State in 2 different columns along with Flight Destination City and Ontime. 9. Create a Table Variable storing all info from the dbo.Flights table of flights that were on time. 10. Create a Table Variable storing all info from the dbo.Flights table of non Texas Flights. Run the following Script 1. Create the following table. dbo.Flights Columns FlightID (PK, int, not null) FlightDateTime (datetime, null) FlightDepartureCity (varchar(50), null) FlightDestinationCity (varchar(50), nul Ontime (int, null) a. There should be a Primary Key on FlightID b. There should be an Identity Constraint on FlightID (100,1) a. 100 = Seed b. 1 Increment = 2. Run the following script to Insert Data into the table. INSERT INTO dbo. Flights (FlightDateTime, Flight DepartureCity, Flight DestinationCity, Ontime) SELECT '1/1/2012', 'Dallas-Texas', 'L.A.', 1 UNION SELECT '1/2/2012', 'Austin-Texas', 'New York', 1 UNION SELECT 1/3/2012', 'Houston-Texas', 'New Jersy', 0 UNION SELECT 1/4/2012', 'San Antonio- Texas', 'Mesquite', 1 UNION SELECT 1/5/2012', 'Lewisville- Texas', 'Albany', 0 SELECT UNION 1/6/2012','Orlando- Florida', 'Atlanta', 1 UNION SELECT 1/7/2012', 'Chicago- Illinois', 'Oklahoma City', 1 UNION SELECT 1/8/2012', 'New Orleans- Louisiana', 'Memphis',0 UNION SELECT 1/9/2012', 'Miami- Florida', 'Charlotte', 1 UNION SELECT '1/10/2012', 'Sacramento- California', 'San Francisco', 1 3. Create and set a Variable equal to the number of Flights that were late. 4. Multiply that amount by the amount lost per late flight ($1,029) and store the amount in another variable. 5. Take the total amount lost (#4) and subtract it from Total profit ($45,000) and store that number in a variable. 6. Find out the Earliest FlightDate and add 10 years to it and store it in a variable. 7. Find out the day of the week for the Latest FlightDate and store it in a variable. 8. Create a table variable with Departure City and State in 2 different columns along with Flight Destination City and Ontime. 9. Create a Table Variable storing all info from the dbo.Flights table of flights that were on time. 10. Create a Table Variable storing all info from the dbo.Flights table of non Texas Flights. Run the following Script
Expert Answer:
Related Book For
Principles of Financial Accounting chapters 1-17
ISBN: 978-1259687747
23rd edition
Authors: John Wild, Ken Shaw, Barbara Chiappetta
Posted Date:
Students also viewed these accounting questions
-
Read the case study "Southwest Airlines," found in Part 2 of your textbook. Review the "Guide to Case Analysis" found on pp. CA1 - CA11 of your textbook. (This guide follows the last case in the...
-
St . Petersburg Graduate School of Management ( GSOM ) in russia . now you required to Analyze the landscape and competitive market of our school ( you will need to choose from which market you are...
-
The point of attachment for two sister chromatids is the a. Centriole. c. Chromosome. b. Centromere, d. Karyotype.
-
The published accounts of Kranak plc included the following information. Notes to the accounts: 1. Schedule of non-current assets at 31 March 2015 Proceeds from the sale of equipment amounted to...
-
In February 2014, defendant Ibrahim M. Shihadeh, d/b/a Creative Designs Kitchen and Baths, agreed to purchase 25% of his anticipated natural gas needs at a fixed price for the 201415 and 201516...
-
Bell Mountain Vineyards is considering updating its current manual accounting system with a high-end electronic system. While the new accounting system would save the company money, the cost of the...
-
the tuition fee for maths tuition for john is expected to be 6500 per year if he attend tuition for 4 year starting from 4 years from now how much does he have to have in her account which yields 6...
-
What is ASIC's role when criminal proceedings are brought against a director?
-
A platinum resistance thermometer is calibrated at two fixed points of the ITS-90, namely at the triple point of water (T1=273,160 K, R = 100,500 2) and at the melting point of tin (72=505,078 K. R =...
-
The ability of an atom to attract the shared electrons in a covalent bond is its electronegativity nonpolarity bonding ability polarity ionic character
-
The reaction shown occurs in the presence of UV light to produce a food quality product. Part A Identify the reactant that is oxidized and the reactant that is reduced. H(g) + Cl(g) 2HCl(g) Match the...
-
How much heat is released when 105 mL of 1.55M HCI is mixed with 195 mL of 0.685M NaOH?
-
At low temperatures, the specific heats of solids are typically proportional to 73. The first understanding of this behavior was due to the Dutch physicist Peter Debye, who in 1912, treated atomic...
-
On the following graph, use the green point (triangle symbol) to plot the annual total revenue when the market price is $40, $60, $80, $100, $120, $140, and $160 per bippitybop. Given graph:...
-
Bobbie Singh provides writing services for small businesses. He blogs for companies that need professionally written content. His business records at November 15, 2023, are shown below: During the...
-
Peachtree Company uses a sales journal, a purchases journal, a cash receipts journal, a cash disbursements journal, and a general journal. The following transactions occur in the month of May. May 1...
-
1. Compute the additional annual net income or loss expected under (a) Plan A and (b) Plan B. 2. Should the company pursue either plan? Discuss both the financial and non-financial factors relevant...
-
Compute the debt-to-equity ratio for each of the following companies. Which company appears to have a riskier financing structure? Explain. Atlanta Company Spokane Company Total liabilities .....
-
The Lorenz curve for Bangladesh looks like this: How much income do individuals in the top income quintile in Bangladesh receive? Cumulative percentage of income 58.7% 37.4 21.3 8.9 20 40 60 80 100%...
-
What would the Lorenz curve for lawyers represent?
-
The accompanying table shows income distribution data for three countries: a. Using this information, draw a Lorenz curve for each country. b. Which country has the most equal distribution of income?...
Study smarter with the SolutionInn App