Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Answer all of these quarries are short ,so please give me full answer.thank you! Implementing a sample Database 01. Create 4 tables described below. Name
Answer all of these quarries are short ,so please give me full answer.thank you!
Implementing a sample Database 01. Create 4 tables described below. Name these tables as FLIGHTS, AIRCRAFT, CERTIFIED, and EMPLOYEES FLIGHTS(flno varchar, ffrom varchar, fto varchar, distance integer, departs.date. Arcives.date); AIRCRAFT(aid varchar, aname varchal. Cruisingrange number); EMPLOYEES(eid varchar. Ename: varchar, Salary number); CERTIFIED (eid varchar, aid varchai); Your Tasks: The underlined fields are the primary keys of their respective tables Insert the values according to the data provided at the end. Use the command DESCRIBE to show the schema of the tables Use the command SELECT * to show the content of the tables Write SQL commands to perform all the required query and take snapshot of them. ******Prepare this task with the screenshots of table schema, table data and query Table: FLIGHTS Fino 246 272 292 895 001 607 852 130 Ffrom Dhaka Chittagong Bandarban Chittagong Jessore Khulna Barisal Jessore Fto Chittagong Cox's Bazar Chittagong Jessore Khulna Sylhet Faridpur Bogra Distance 1020 820 190 2060 7240 1650 6525 Departs 09:30 13:20 10:44 07:00 14:00 20:45 10:30 07:00 Arrives 12:43 16:13 11:40 09:05 19:20 22:25 09:25 2790 15:09 Table: AIRCRAFT Aid 1 2 3 4 5 6 7 8 9 Aname Airbus A319 Airbus A330 Airbus A340 Boeing 717 Boeing 737-700 Boeing 767-300 Boeing 747-400 Dornier 228 Ilyushin 1162 Cruisingrange 3000 6400 8000 1580 3800 7080 8380 834 11000 Table: EMPLOYEES Eid Aid 1 1 1 4 2 2 6 2 7 3 1 NN 3 5 000 4 4 1 4 4 | | 4 5 5 3 5 7 7 3 N 7 6 7 7 7 9 Table: EMPLOYEES Eid Ename 1 Jafar Ahmed Shariar Choudhury 3 Jamal E Mollah 4 Alvi Hussain 5 Tonmoy Jaman 6 Vibek Joardar 7 Jannatul Lamia Toukir Munshi Yakub Noby 10 Mithila Rounok 11 Jobbar Shekh 12 Chunnu Wahidul Salary 58000 103000 55000 67000 81000 45000 118000 79000 69000 48000 42000 58000 9 N 9 5 9 6 8 9 4 10 10 8 TIPS insert into table_name (date_field) values (TO_DATE ('2003/05/03 21:02:44', 'yyyy/mm/dd hh24:mi:ss')); select to_char (meeting_time, 'HH24:MI:SS') from schedule - - - - - 1 select to_date ('10:00', 'hh:mi') from dual - List of queries as Assignment: 1) Find the names of Pilots certified for some Boeing aircraft 2) Find the aid 's of all aircraft that can be used on non-stop flights from Jessore to Khulna. (hint: Only those aircraft are eligible which have cruisingrange greater than distance between Jessore and Khulna) 3) Identify the flights that can be piloted by every pilot whose salary is more than $100000. 4) Find the names of Pilots who can operate planes with a range greater than 3,000 miles but are not certified on any Boeing aircraft. 5) Find the eid's of employees who make the second highest salary. 6) Find the eid's of employees who are certified for the largest number of aircraft. 7) Find the eid 's of employees who are certified for exactly three aircraft 8) Find the total amount paid to employees as salaries. 9) Find the names of aircraft such that all pilots certified to operate them earn more than 80,000 10) Foreach pilot who is certified for more than three aircraft, find the aid and the maximum cruisingrange of the aircraft that he or she) is certified for. 11) For all aircraft with cruisingrange over 1000 miles, find the name of the aircraft and the average salary of all pilots certified for this aircraft. 12) Find the aid's of all aircraft that can be used on routes from Jessore to Chittagong. 13) Compute and print the difference between the average salary of a pilot and the average salary of all employees (including pilots) 14) Print the name and salary of every nonpilot whose salary is more than the average salary of pilots. 15) Find aid 's of all flights which fly from Jessore to Sylhet, n not more than 2 hops
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