No Name Salary Zone Age Grade Dept
No Name Salary Zone Age Grade Dept
5. consider the following table and write sql queries and their output.
Books
Book_ID Book_Name AuthorName Publisher Price Type Qty
F0001 The Tears William First Pub 750 Fiction 10
Hopkins
F0002 Thunderbolts Anna First Pub 700 Fiction 5
Roberts
T0001 My First Brain and Br EPD 250 Text 10
C++
i) To display the names and price of the books in descending order of their price
ii) To display average price of all books of text type.
iii) display the record of all books in descending order of their quantify.
iv) To delete all entry of fiction type.
v) Remove the column price from the table.
6.
i) create the below two table .Tables should have appropriate constraint like
primary key, foreign key, not null .
Flights
FL_no Starting Ending NO_Flights NO_Stops
IC301 Mumbai Delhi 8 0
IC799 Banglore Delhi 2 1
MC101 Indore Mumbai 3 0
IC302 Delhi Mumbai 8 0
AM812 Kanpur Banglore 3 1
IC899 Mumbai Kochi 1 4
Fares
Fl_No Airlie Fare Pertax
IC701 Indian Airlines 6500 10
MU499 Sahara 9400 5
AM501 Jet Airways 13450 8
IC899 Indian Airlines 8300 4
IC302 Indian Airlines 4300 10