Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Consider the following relational schema for the airport transfer database: airport ( a-code, name, capacity)

Consider the following relational schema for the airport transfer database:

airport ( a-code, name, capacity) <- a-code is primary key customer ( c-id, name, birth-year, address) <- c-id is primary key vehicle ( plate, capacity, driver-name) <- plate is primary key transfer( a-code, c-id, plate, year, ti-no) <- a-code, c-id, plate, year are primary key ticket ( ti-no, price) <- ti-no is primary key

Give the corresponding SQL queries for each of the following. (a) Find the vehicle plates, which are used in the transfers to "Esenboga" Airport, and also have a driver whose name has at least five characters and starts with 'Z'.

(b) List the airport codes with the total number of transfer tickets sold, and also total price.

(c) Find the oldest customer's birth year and address, who have not bought any ticket yet.

(d) Find the code and name of the airport with the 5th highest capacity. You can assume, for simplicity, that the capacity values are distinct.

(e) Delete vehicles that have capacity lower than the average number of customers that are transferred by a vehicle in 2017.

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

The World Wide Web And Databases International Workshop Webdb 98 Valencia Spain March 27 28 1998 Selected Papers Lncs 1590

Authors: Paolo Atzeni ,Alberto Mendelzon ,Giansalvatore Mecca

1st Edition

3540658904, 978-3540658900

More Books

Students also viewed these Databases questions

Question

What are accounting and administrative controls?

Answered: 1 week ago

Question

LOQ 16-1: How do psychotherapy and the biomedical therapies differ?

Answered: 1 week ago