Question: 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

 LAB 3: Insert sample data into the tables. (At least 15

records for each table) LABs 4 and 5: Write an SQL query

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

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!