Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Print the total amount, the average dollar value of service visits (parts and labour costs) and the number of those visits for Acura, Mercedes and

Print the total amount, the average dollar value of service visits (parts and labour costs) and the number of those visits for Acura, Mercedes and Jaguar car makes that are sold between September 2015 and December 2018 inclusive.

use window_frame_clause

SQL Oracle Database:

image text in transcribed

SALEINV CUSTOMER saleinvno CHAR(6) VARCHAR2(20) custname saledate DATE NOT NULL VARCHAR2(20) NOT NULL custstreet CAR salesman H custcity VARCHAR2(20) NOT NULL VARCHAR2(20) NOT NULL CHAR(8) carserial NOT NULL DEFAULT 'ON CHAR(2) custname VARCHAR2(20) NOT NULL custprovince custname VARCHAR2(20) NOT NULL NOT NULL CHAR(7) carserial CHAR(8) custpostal carmake VARCHAR2(10) NOT NULL insfire NOT NULL CHAR(1) custhphone CHAR(13) carmodel VARCHAR2(10) NOT NULL inscollision CHAR(1) NOT NULL custbphone CHAR(13) CHAR(4) NOT NULL caryear insliability CHAR(1) VARCHAR2(12) NOT NULL + extcolour insproperty CHAR(1) cartrim VARCHAR2(16) NOT NULL SERVINV PROSPECT taxrate NUMBER(4,2) DEFAULT 13.0 enginetype VARCHAR2(10) NOT NULL %23 servinvno CHAR(5). custname VARCHAR2(20) NOT NULL licfee NUMBER(6,2) enginetype VARCHAR2(10) NOT NULL DATE NOT NULL VARCHAR2(10) NOT NULL servdate discount carmake NUMBER(8.2) purchinvno CHAR(6) e purchcost NUMBER(9.2) custname VARCHAR2(20) NOT NULL carmodel VARCHAR2(10) commission NUMBER(8,2) carserial CHAR(8) NOT NULL CHAR(4) caryear carsaleprice NUMBER(9.2) freightcost NUMBER(9.2) partscost NUMBER(7,2) VARCHAR2(12) carcolour carlistprice NUMBER(9.2) laborcost NUMBER(7,2) cartrim VARCHAR2(16) taxrate NUMBER(4,2) DEFAULT 13.0 optioncode CHAR2(4) Text TRADEINV EMPLOYEE PURCHINV SERVWORK saleinvno CHAR(6) purchinvno CHAR(6) VARCHAR2(20) empname carserial CHAR(8) servinvno CHAR(5) startdate DATE NOT NULL purchfrom VARCHAR2(15) workdesc VARCHAR2(80) tradeallow NUMBER(9,2) commissionrate NUMBER(3,1) purchdate DATE VARCHAR2(26) title OPTIONS BASEOPTION VARCHAR2(20) manager optioncode CHAR(4) INVOPTION optioncode CHAR(4) optiondesc VARCHAR2(30) carserial CHAR(8) CHAR(6) saleinvno o optioncode CHAR(4) NUMBER(7,2) + optioncost optionlistprice NUMBER(7,2) NUMBER(7,2) optionprice SALEINV CUSTOMER saleinvno CHAR(6) VARCHAR2(20) custname saledate DATE NOT NULL VARCHAR2(20) NOT NULL custstreet CAR salesman H custcity VARCHAR2(20) NOT NULL VARCHAR2(20) NOT NULL CHAR(8) carserial NOT NULL DEFAULT 'ON CHAR(2) custname VARCHAR2(20) NOT NULL custprovince custname VARCHAR2(20) NOT NULL NOT NULL CHAR(7) carserial CHAR(8) custpostal carmake VARCHAR2(10) NOT NULL insfire NOT NULL CHAR(1) custhphone CHAR(13) carmodel VARCHAR2(10) NOT NULL inscollision CHAR(1) NOT NULL custbphone CHAR(13) CHAR(4) NOT NULL caryear insliability CHAR(1) VARCHAR2(12) NOT NULL + extcolour insproperty CHAR(1) cartrim VARCHAR2(16) NOT NULL SERVINV PROSPECT taxrate NUMBER(4,2) DEFAULT 13.0 enginetype VARCHAR2(10) NOT NULL %23 servinvno CHAR(5). custname VARCHAR2(20) NOT NULL licfee NUMBER(6,2) enginetype VARCHAR2(10) NOT NULL DATE NOT NULL VARCHAR2(10) NOT NULL servdate discount carmake NUMBER(8.2) purchinvno CHAR(6) e purchcost NUMBER(9.2) custname VARCHAR2(20) NOT NULL carmodel VARCHAR2(10) commission NUMBER(8,2) carserial CHAR(8) NOT NULL CHAR(4) caryear carsaleprice NUMBER(9.2) freightcost NUMBER(9.2) partscost NUMBER(7,2) VARCHAR2(12) carcolour carlistprice NUMBER(9.2) laborcost NUMBER(7,2) cartrim VARCHAR2(16) taxrate NUMBER(4,2) DEFAULT 13.0 optioncode CHAR2(4) Text TRADEINV EMPLOYEE PURCHINV SERVWORK saleinvno CHAR(6) purchinvno CHAR(6) VARCHAR2(20) empname carserial CHAR(8) servinvno CHAR(5) startdate DATE NOT NULL purchfrom VARCHAR2(15) workdesc VARCHAR2(80) tradeallow NUMBER(9,2) commissionrate NUMBER(3,1) purchdate DATE VARCHAR2(26) title OPTIONS BASEOPTION VARCHAR2(20) manager optioncode CHAR(4) INVOPTION optioncode CHAR(4) optiondesc VARCHAR2(30) carserial CHAR(8) CHAR(6) saleinvno o optioncode CHAR(4) NUMBER(7,2) + optioncost optionlistprice NUMBER(7,2) NUMBER(7,2) optionprice

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

Informix Database Administrators Survival Guide

Authors: Joe Lumbley

1st Edition

0131243144, 978-0131243149

More Books

Students also viewed these Databases questions

Question

What was the positive value of Max Weber's model of "bureaucracy?"

Answered: 1 week ago