Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

LAB 3: Insert sample data into the tables. (At least 15 records for each table) LABs 4 and 5: Write an SQL query for the

image text in transcribed

image text in transcribed

LAB 3:

Insert sample data into the tables. (At least 15 records for each table) LABs 4 and 5:

Write an SQL query for the following questions:

  1. How many reservations are recorded in the database?

  2. Which state does have the most number of passengers?

  3. What is the most common method of payment?

  4. List the destinations have been reserved more than 10 times.

  5. List the name of destinations with the number of tickets for each.

  6. List the most reserved destination in the ascending order.

  7. List customers and the number of reservations each has.

  8. What is the average capacity airports?

  9. What is the most crowded flight?

  10. What is the ID of the largest airport?

  11. What is/are the most favorite airline(s)?

  12. List and rank preferred methods of payment.

  13. Which travelling company has the highest commission?

LAB 6:

  • Write a trigger to save all modification on table reservations. (Update and Delete).

    LAB 7:

  • Finalization and show of all work done throughout the semester.

Passengers passenger_id pk doc type doc id first_name last_name phone email address id fk Traveling company id pk name commission Addresses address_id pk city state country note pk fk fk Reservation reservation id passenger_id payment method_id flight number date destination airport class Payment peyment method_id payment_type note pk pk pk Airline airline_id airline_name country class Airport airport_id airport_name country address_id capacity fk LAB 3: Insert sample data into the tables. (At least 15 records for each table) LABs 4 and 5: . Write an SQL query for the following questions: 1. How many reservations are recorded in the database? 2. Which state does have the most number of passengers? 3. What is the most common method of payment? 4. List the destinations have been reserved more than 10 times. 5. List the name of destinations with the number of tickets for each. 6. List the most reserved destination in the ascending order. 7. List customers and the number of reservations each has. 8. What is the average capacity airports? 9. What is the most crowded flight? 10. What is the ID of the largest airport? 11. What is/are the most favorite airline(s)? 12. List and rank preferred methods of payment. 13. Which travelling company has the highest commission? LAB 6: . Write a trigger to save all modification on table reservations. (Update and Delete). LAB 7: . Finalization and show of all work done throughout the semester

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

Database And Expert Systems Applications 33rd International Conference Dexa 2022 Vienna Austria August 22 24 2022 Proceedings Part 1 Lncs 13426

Authors: Christine Strauss ,Alfredo Cuzzocrea ,Gabriele Kotsis ,A Min Tjoa ,Ismail Khalil

1st Edition

3031124227, 978-3031124228

More Books

Students also viewed these Databases questions

Question

=+ Are they breakable for any reason?

Answered: 1 week ago

Question

=+When and under what circumstances are contracts renegotiated?

Answered: 1 week ago

Question

=+Are the contracts enforceable?

Answered: 1 week ago