Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please solve these and also explain how to do them. 2 | l | AMOOEL PK MOD _ CODE MOD _ MANUF MOD _ NAME

Please solve these and also explain how to do them. 2|l| AMOOEL
PK MOD_CODE
MOD_MANUF
MOD_NAME
MOD_SEATS
MOD_CHG_MILE
1|l| ARCRAFT
P. REFERENCESD PK AC_NUMBER
MOD_CODE
AC_TTAF
AC_TTEL
AC_TTER
CHAR_FUEL_GALLONS CHAR_OIL_QTS CUS_CODE1. Write a query that will list all the charter flights. Display the ac number, model name, charge per mile, distance, total flight cost (charge per mile * distance), and destination. Display the balance as currency with 2 decimal places. Sort the results in ascending order by the destination. 2. The airport manager wants to know the total distance flown and number of flights for each destination. The manager only wants to see those in which the Total Distance is greater than the average distance for all flights. Order the results in ascending order by charter destination. HINT: you will need to use a subquery on the having line. 3. Due to increasing gas prices, the cost of larger flights will increase by 5.5%. Write a single SQL command to increase the charge per mile for all airline models with 10 seats or more. Show the update statement and a screen shot of the number of rows update and then select the updated rows and show them in your screen shot. 4. Write a single query that will delete employee 104 and employee 101 from the employee table. You will get an error message when executing. Explain the error message. 5. Write a query that will display the number who have earned each rating type. Display the rating name, the rating code and the count. Display the results in descending order by the count.6. For all flights on 2/5/2016, display the char_date, ac_number, char_dest, char_distnace, char_hours_flow, and the Flight Cost - calculated using the fuel_gallons * chg mile. Display the flight cost as currency with 2 decimal places. 7. You are interested in looking at all flights to "STL". You want to know the total distance and the total hours flown by aircraft number for all flights to STL.8. For each employee, display their length of employment, using their hire date year and the current date. Display those who have been employed for 10 or more years. Sort the rows in descending order by length of employment.

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

Big Data, Mining, And Analytics Components Of Strategic Decision Making

Authors: Stephan Kudyba

1st Edition

1466568704, 9781466568709

More Books

Students also viewed these Databases questions

Question

=+b) What is the factor?

Answered: 1 week ago