Assignment title: Information
You are required to perform the followings tasks: 1. Create a text file named Create_.sql (for example, Create_3087654.sql) that will contain SQL statements to: I. Create a database named CTSDB. II. Create all of the tables for the database according to the Database schema given at the end of this document. 2. Create a text file named Insert_.sql that will contain SQL statements to: I. Insert at least five records in each of the tables. The test data inserted into the table must ensure that each of the queries, specified in Task 4, outputs at least one record. 3. Create a text file named Query_.sql that will contain all the queries to display the following I. A list of available Vehicles sorted according to seating capacity. Display the Make, Model, Registration number, and the Seating capacity. II. Find the Locations whose Street names consist of two words. The last word is four character long ending with a 'd'. Display the full street addresses. III. A list of Official sorted according to their First name followed by Last name. Display their full names, Country names, and the Languages they speak. IV. A list of Drivers having both special security training above level T and first aid training level above B. Display their full names and the levels of first aid training and special security training. V. List the Drivers who have driven more than 1000 KM in total. Display their full names and total kilometres travelled. Show the list sorted by total kilometre travelled. VI. Find the Vehicles whose repair cost was more than the average repair cost. 2 Database Management Systems VII. A list of all Officials who have not made any booking request yet. Display the officials' full names and the description of their roles. VIII. List the Trips whose actual travel time exceeded the intended travel time by 1 hour or whose actual start time exceeded the intended start time by 30 minutes. Display the corresponding drivers' and officials' full names. IX. Find the Trips whose pick‐up locations' street name and drop‐off locations' street name are the same. Display the full names of the Drivers, full name of the Officials, and the full Street addresses of the pick‐up and drop‐off locations. X. Find the Vehicles that incurred the maximum cost in total for maintenance and repair. 4. Create a text file named Booking_.sql that will perform the followings. Insert additional data in the tables appropriately if needed. I. An Official named Daniel Ortega from Spain, having OfficialID SPN99710, wants to make a booking. He speaks Spanish and he will play the role of a 'Judge' in the games. He wants to travel from 16 Nielsens Rd, Gold Coast to 117 Pacific Avenue, Gold Coast on April 9, 2015. His expected start time is 10:00 am and end time is 10:45 am. II. The above trip was performed using the vehicle having VIN number SANFDAE11U1286116. The starting odometer reading for the vehicle was 26982 KM. The trip started at 10:15 and ended at 11:55 am. At the end of the trip the odometer reading was 27119 KM. The driver for the trip was John Arnold having Driving licence number 098674432. John Arnold, although has a First Aid training (level D), completed on August 17, 2013, he does not have a special security clearance. John Arnold speaks both English and Spanish. You are required to adhere to the following output formatting conventions: All monetary values should be printed with a dollar symbol ($) You must use consistent and legible formatting in laying out your SQL queries. Include (brief) comments for any query or procedure that uses an "unusual" approach