Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Suppose a car hire company has a database containing tables called CAR and CAR_STATUS. Each car is represented by the plate number, car make and

Suppose a car hire company has a database containing tables called CAR and CAR_STATUS. Each car is represented by the plate number, car make and model, date of registration, body colour, number of seater, capacity of the engine in cubic centimeters (cc), transmission, fuel type (Petrol or Diesel), car price and rental per day. The CAR_STATUS indicates the current odometer and the availability of cars for rental; Y car is available and N car is currently hired

image text in transcribed

Write Oracle SQL commands to answer the following:

List the details of (i) all cars, (ii) Diesel cars and (iii) Toyota cars.

Using logical operators, list the plate number, makeModel, cc and price of cars, which cost between 40,000 and 65,000 inclusive or capacity of the engine in cubic centimeters (cc) more than 1.6.

List makeModel along with the total, average, maximum, and minimum price of cars in each model.

List the makeModel and total number of cars which maker begins with T.

List the platenum, makeModel, cc, transmission, fuel and rental rate of cars available for rental.

Assume the daily rental of cars with 2.0cc and above is increased by 10% and other cars by 5%. Reflect these changes in the relevant table.

Create a view called VIEWPETROL which returns a result containing the plate numbers, car make and model, transmission, fuel type and daily rental rate of Petrol cars. Then list out all cars in this view.

cars Word Sign in -0 Insert Design Layout References Mailings Review View Tell me what you want to do Share File Home Find c Replace Select- Editing Copy Paste Normal No Spac.. Heading1 Heading 2 Title Subtitle Subtle Em.. Fonmat Painter Clipboard Font Paragraph Styles CAR Toyota11 Apr 2011 20 Mal P Ape 2011 1S Mar 201 20 Auto 9 Auto Toyota13 Sep 2014 0 Auto CAR STATUS BAB213 BAL13 Page 1 of 1 words LP English (United States) 82% O Type here to search ENG 6:25 PM 11/12/2017 2

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_2

Step: 3

blur-text-image_3

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

Databases On The Web Designing And Programming For Network Access

Authors: Patricia Ju

1st Edition

1558515100, 978-1558515109

More Books

Students also viewed these Databases questions