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 for the following questions:
-
How many reservations are recorded in the database?
-
Which state does have the most number of passengers?
-
What is the most common method of payment?
-
List the destinations have been reserved more than 10 times.
-
List the name of destinations with the number of tickets for each.
-
List the most reserved destination in the ascending order.
-
List customers and the number of reservations each has.
-
What is the average capacity airports?
-
What is the most crowded flight?
-
What is the ID of the largest airport?
-
What is/are the most favorite airline(s)?
-
List and rank preferred methods of payment.
-
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
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started