TIME
Sale_Day (PK)
Day_Type
SALES_FACTS
Sale_Day (FK)
Vehicle_Code (FK)
Plan_Code (FK)
Dealer_ID (FK)
Vehicles_Sold
Gross_Sales_Amt
...
FINANCING_PLANS
Plan_Code (PK)
Loan_Type
Institution_Name
Loan_Perc_Rate
Min_Down
Max_Loan_Amount
Max_Term
DEALERSHIPS
Dealer_ID (PK)
Location
Region_ID
Street Address
City
State
Zip Code
Phone
Sq Ft
Opened Date
Manager
District_ID
VEHICLES
Vehicle_Code (PK)
Description
Star Schema for OVS, Inc. Data Warehouse
a single
fact
PK of
a fact
calculated values
for each fact
MP#3 - Major Paper - Information/Decision Briefing
Attached Files:
· Military Briefings Appendix E FM-101-5.pdfMilitary Briefings Appendix E FM-101-5.pdf - Alternative Formats (57.632 KB)
· MILITARY BRIEFINGS.pdfMILITARY BRIEFINGS.pdf - Alternative Formats (145.122 KB)
· INFORMATIONAL BRIEFING.pdfINFORMATIONAL BRIEFING.pdf - Alternative Formats (133.012 KB)
We hope that this assignment can be of use and resource for you, whether now, in the future, or possibly even debriefing and analyzing some event in your past advising ministry that you would reconstruct if you could now.
Your paper itself will be approximately 2,000 to 3,000 words. However, much of that will involve describing your scene and situation. You will then provide a brief to the person that you are advising regarding a situation within the organization. You will: 1) describe the situation including its current and possible future effects; 2) Describe various options in response, including their possible future effects; and 3) Recommend a course of action, including reasons for the recommendation, with the costs and benefits examined and weighed, and advocacy of why this course will be best for future effects. You may choose to recommend more than one course of action for the advisee to choose from. The Information/Decision brief itself should be relatively short--in the range of 500 words (approximately 2 pages double-spaced). You can provide, at the end, if you wish, space for choosing, and for further research and consideration. If you are privately advising a leader, your briefing will probably be followed by conversation prior to a decision choice or a choice for more research. Allow for various possibilities.
This scenario can be one based on your own work situation, whether past, present, or possibly future (that is, a place where you envision serving).
Several files are attached with regard to military briefings. The principles apply generally to many other functional areas of chaplaincy--suitably modified. You will find in these files much helpful information regarding organization and presentation. You will notice that a Decision Briefing is basically an Information Briefing taken to the next step. That is your task here.
MP#3
-
Major
Paper
-
Information/Decision
Briefing
Attached Files:
·
Military
Briefings
Appendix
E
FM
-
101
-
5.pdf
Military
Briefings
Appendix
E
FM
-
101
-
5.pdf
-
Alternative
Formats
(
57.632
...
2. Location
Region_ID
Street Address
City
State
Zip Code
Phone
Sq Ft
Opened Date
Manager
District_ID
VEHICLES
Vehicle_Code (PK)
Description
Star Schema for OVS, Inc. Data Warehouse
a single
fact
PK of
a fact
calculated values
for each fact
MP#3 - Major Paper - Information/Decision Briefing
Attached Files:
· Military Briefings Appendix E FM-101-5.pdfMilitary
Briefings Appendix E FM-101-5.pdf - Alternative
Formats (57.632 KB)
· MILITARY BRIEFINGS.pdfMILITARY BRIEFINGS.pdf -
Alternative Formats (145.122 KB)
· INFORMATIONAL BRIEFING.pdfINFORMATIONAL
BRIEFING.pdf - Alternative Formats (133.012 KB)
We hope that this assignment can be of use and resource for
you, whether now, in the future, or possibly even debriefing and
analyzing some event in your past advising ministry that you
3. would reconstruct if you could now.
Your paper itself will be approximately 2,000 to 3,000 words.
However, much of that will involve describing your scene and
situation. You will then provide a brief to the person that you
are advising regarding a situation within the organization. You
will: 1) describe the situation including its current and possible
future effects; 2) Describe various options in response,
including their possible future effects; and 3) Recommend a
course of action, including reasons for the recommendation,
with the costs and benefits examined and weighed, and
advocacy of why this course will be best for future effects. You
may choose to recommend more than one course of action for
the advisee to choose from. The Information/Decision brief
itself should be relatively short--in the range of 500 words
(approximately 2 pages double-spaced). You can provide, at the
end, if you wish, space for choosing, and for further research
and consideration. If you are privately advising a leader, your
briefing will probably be followed by conversation prior to a
decision choice or a choice for more research. Allow for
various possibilities.
This scenario can be one based on your own work situation,
whether past, present, or possibly future (that is, a place where
you envision serving).
Several files are attached with regard to military briefings. The
principles apply generally to many other functional areas of
chaplaincy--suitably modified. You will find in these files
much helpful information regarding organization and
presentation. You will notice that a Decision Briefing is
basically an Information Briefing taken to the next step. That is
your task here.
MP#3
-
7. mately 2,000 to 3,000 words.
However, much of that will
involve describing your scene and situation.
You will then provide a brief to the person
that you are advising regarding a situation within the
organization.
You will: 1) describe
the situation inc
luding its current and possible future effects; 2) Describe
various options
in response, including their possible future effects; and 3)
Recommend a course of
action, including reasons for the recommendation, with the
costs and benefits examined
and weighe
d, and advocacy of why this course will be best for future
effects.
You may
choose to recommend more than one course of action for the
advisee to choose
from.
The Information/Decision brief itself should be relatively short
--
in the range of 500
words (ap
proximately 2 pages double
8. -
spaced).
You can provide, at the end, if you
wish, space for choosing, and for further research and
consideration.
If you are
privately advising a leader, your briefing will probably be
followed by conversation prior
to a decis
ion choice or a choice for more research.
Allow for various possibilities.
This scenario can be one based on your own work situation,
whether past, present, or
possibly future (that is, a place where you envision serving).
Several files are attached with
regard to military briefings.
The principles apply
generally to many other functional areas of chaplaincy
--
suitably modified.
You will find
in these files much helpful information regarding organization
and presentation.
9. You will
notice that a Decision
Briefing is basically an Information Briefing taken to the next
step.
That is your task here.
MP#3 - Major Paper - Information/Decision Briefing
Attached Files:
-101-5.pdf Military
Briefings Appendix E FM-101-5.pdf - Alternative
Formats (57.632 KB)
BRIEFINGS.pdf -
Alternative Formats (145.122 KB)
BRIEFING.pdf - Alternative Formats (133.012 KB)
We hope that this assignment can be of use and resource for
you, whether now, in the
future, or possibly even debriefing and analyzing some event in
your past advising
ministry that you would reconstruct if you could now.
Your paper itself will be approximately 2,000 to 3,000 words.
However, much of that will
involve describing your scene and situation. You will then
provide a brief to the person
that you are advising regarding a situation within the
organization. You will: 1) describe
the situation including its current and possible future effects; 2)
Describe various options
in response, including their possible future effects; and 3)
Recommend a course of
action, including reasons for the recommendation, with the
costs and benefits examined
10. and weighed, and advocacy of why this course will be best for
future effects. You may
choose to recommend more than one course of action for the
advisee to choose
from. The Information/Decision brief itself should be relatively
short--in the range of 500
words (approximately 2 pages double-spaced). You can
provide, at the end, if you
wish, space for choosing, and for further research and
consideration. If you are
privately advising a leader, your briefing will probably be
followed by conversation prior
to a decision choice or a choice for more research. Allow for
various possibilities.
This scenario can be one based on your own work situation,
whether past, present, or
possibly future (that is, a place where you envision serving).
Several files are attached with regard to military briefings. The
principles apply
generally to many other functional areas of chaplaincy--suitably
modified. You will find
in these files much helpful information regarding organization
and presentation. You will
notice that a Decision Briefing is basically an Information
Briefing taken to the next
step. That is your task here.
create table CUSTOMERS (
CustID number not null constraint table_1_pk primary key,
LastName varchar2(60) not null,
FirstName varchar2(60) not null,
11. MI varchar2(1),
Address varchar2(60) not null,
Street varchar2(60) not null,
City varchar2(60) not null,
State varchar2(60) not null,
Zip number not null
);
create table sales (
Sale_ID number not null constraint sales_pk primary key,
gross_sale_price number not null,
vehicle_status varchar2(20) not null,
mileage number not null,
vehicle_date date not null,
CustID number not null,
VIN number not null
);
12. create table VEHICLES (
VIN number not null constraint vehicles_pk primary key,
model varchar2(60) not null,
make varchar2(60) not null,
wholesale_cost varchar2(10) not null,
wherefrom varchar2(60) not null,
type varchar2(60) not null
)
;
INSERT ALL
INTO CUSTOMERS values(123, 'Nelson', 'Freeman', 'N', '614-
601-5147', 'Abdella Way', 'New York', 'New york',12345)
INTO CUSTOMERS values(16, 'Mary', 'Mader', 'K', '614-624-
6628', 'Alwyne Avenue', 'Philadelphia', 'Philadelphia', 43441)
INTO CUSTOMERS values(3, 'William', 'Mack','A', '330-949-
2522', 'Arcadia Lakes Drive', 'Alaska', 'Alaska', 23423)
INTO CUSTOMERS values(4, 'Mary', 'Burbank', 'G','330-512-
9725', 'Arruda Terrace', 'Summerville', 'Alabama', 22323)
INTO CUSTOMERS values(7, 'Enoch', 'Whitman', 'S', '216-848-
9837', 'Atwood Way', 'Texas', 'Texas', 33234)
14. SELECT * FROM DUAL
;
INSERT ALL
INTO SALES values(1, 400000, 'in stock', 20, '01-APR-98', 12,
34)
INTO SALES values(2, 200000, 'sold', 30, '13-Mar-2020', 32,
64)
INTO SALES values(3, 500000, 'available', 40, '01-APR-98',
42, 84)
INTO SALES values(5, 600000, 'sold', 0, '01-APR-98', 52, 74)
INTO SALES values(13, 450000, 'in stock', 0, '01-APR-98', 1,
4)
INTO SALES values(41, 200000, 'sold', 40, '01-APR-98', 82, 4)
INTO SALES values(91, 500000, 'sold', 78, '01-APR-98', 73,
94)
INTO SALES values(51, 20000, 'in stock', 20, '01-APR-98', 92,
84)
INTO SALES values(14, 200000, 'sold', 20, '01-APR-98', 124,
534)
15. INTO SALES values(16, 200000, 'sold', 20, '01-APR-98', 125,
734)
INTO SALES values(19, 200000, 'available', 20, '01-APR-98',
212, 234)
INTO SALES values(198, 700000, 'sold', 0, '01-APR-98', 912,
934)
INTO SALES values(12, 200000, 'sold', 60, '01-APR-98', 152,
834)
SELECT * FROM DUAL;
INSERT ALL
INTO VEHICLES values(1, 'Toyota', 'SUV', '20000', 'Japan',
'SUV')
INTO VEHICLES values(2, 'Ford', 'SUV', '40000', 'USA',
'SUV')
INTO VEHICLES values(3, 'Toyota', 'SUV', '90000', 'Japan',
'SUV')
INTO VEHICLES values(4, 'Toyota', 'SUV', '70000', 'Japan',
'SUV')
INTO VEHICLES values(5, 'Toyota', 'SUV', '30000', 'Japan',
'SUV')
INTO VEHICLES values(6, 'Toyota', 'SUV', '40000', 'Japan',
'SUV')
16. INTO VEHICLES values(7, 'Toyota', 'SUV', '20000', 'Japan',
'SUV')
INTO VEHICLES values(8, 'Toyota', 'SUV', '20000', 'Japan',
'SUV')
INTO VEHICLES values(9, 'Toyota', 'SUV', '20000', 'Japan',
'SUV')
INTO VEHICLES values(10, 'Toyota', 'SUV', '520000', 'Japan',
'SUV')
INTO VEHICLES values(11, 'Toyota', 'SUV', '40000', 'Japan',
'SUV')
SELECT * FROM DUAL;
select * from sales;
select * from customers;
select * from vehicles;
create table CUSTOMERS (
CustID number not null constraint customers_1_pk primary
17. key,
LastName varchar2(60) not null,
FirstName varchar2(60) not null,
MI varchar2(1),
Address varchar2(60) not null,
Street varchar2(60) not null,
City varchar2(60) not null,
State varchar2(60) not null,
Zip number not null
);
create table VEHICLES (
VIN number not null constraint vehicles_pk primary key,
make varchar2(60) not null,
model varchar2(60) not null,
wholesale_cost varchar2(10) not null,
wherefrom varchar2(60) not null,
type varchar2(60) not null
18. );
create table sales (
sale_ID number not null constraint sales_pk primary key,
gross_sale_price number not null,
vehicle_status varchar2(20) not null,
mileage number not null,
vehicle_date date not null,
CustID number not null,
VIN number not null,
CONSTRAINT fk_CUSTOMERS FOREIGN KEY (CustID)
REFERENCES CUSTOMERS(CustID),
CONSTRAINT fk_VEHICLES FOREIGN KEY (VIN)
REFERENCES VEHICLES(VIN)
);
INSERT ALL
INTO CUSTOMERS values(1, 'Nelson', 'Freeman', 'N', '614-
601-5147', 'Abdella Way', 'New York', 'New york',12345)
INTO CUSTOMERS values(2, 'Mary', 'Mader', 'K', '614-624-
27. 5776', 'Hollywood', 'Hollywood', 'Nebraska', 23235)
INTO CUSTOMERS values(99, 'Nathanial', 'Whitman', 'M',
'216-596-6123', 'Springsfield', 'Alabama', 'Alabama', 34323)
INTO CUSTOMERS values(100, 'Jane', 'Hunter', 'C', '216-596-
6321', 'Silicone Valley', 'Silicone valley', 'New York', 34393)
SELECT * FROM DUAL;
SELECT COUNT(*) FROM customers;
INSERT ALL
INTO VEHICLES values(1, 'Toyota', 'C-HR', '20000', 'Japan',
'SUV')
INTO VEHICLES values(2, 'Ford', 'BRONCO', '40000', 'USA',
'SUV')
INTO VEHICLES values(3, 'Toyota', 'Corolla', '90000', 'Japan',
'SUV')
INTO VEHICLES values(4, 'Toyota', 'Yaris', '70000', 'Japan',
'SUV')
INTO VEHICLES values(5, 'Toyota', '4Runner', '30000', 'Japan',
'SUV')
INTO VEHICLES values(6, 'Toyota', 'Tundra', '40000', 'Japan',
'SUV')
28. INTO VEHICLES values(7, 'Toyota', 'Taacoma', '20000',
'Japan', 'SUV')
INTO VEHICLES values(8, 'Toyota', 'Camry Hybrid', '20000',
'Japan', 'SUV')
INTO VEHICLES values(9, 'Toyota', 'Corolla Hybrid', '20000',
'Japan', 'SUV')
INTO VEHICLES values(10, 'Ford', 'MUSTANG MACH-E',
'520000', 'USA', 'SUV')
INTO VEHICLES values(11, 'Ford', 'ECOSPORT', '40000',
'USA', 'SUV')
INTO VEHICLES values(12, 'Ford', 'ESCAPE', '20000', 'USA',
'SUV')
INTO VEHICLES values(13, 'Ford', 'EXPLORER', '40000',
'USA', 'SUV')
INTO VEHICLES values(14, 'Ford', 'EXPEDITION', '90000',
'USA', 'SUV')
INTO VEHICLES values(15, 'Ford', 'Mustang Mach-E', '70000',
'USA', 'SUV')
INTO VEHICLES values(16, 'Ford', 'Escape Hybrid', '30000',
'USA', 'SUV')
INTO VEHICLES values(17, 'Ford', ' Expedition MAX', '40000',
'USA', 'SUV')
INTO VEHICLES values(18, 'Ford', '2018 Ford Escape',
'20000', 'USA', 'SUV')
29. INTO VEHICLES values(19, 'Ford', '2021 Ford Expedition
MAX', '20000', 'Ford', 'SUV')
INTO VEHICLES values(20, 'Nissan', 'KICKS', '20000', 'Japan',
'SUV')
INTO VEHICLES values(21, 'Nissan', 'Rogue Sport', '40000',
'Japan', 'SUV')
INTO VEHICLES values(22, 'Nissan', 'Rogue', '20000', 'Japan',
'SUV')
INTO VEHICLES values(23, 'Nissan', 'Murano', '40000',
'Japan', 'SUV')
INTO VEHICLES values(24, 'Nissan', 'Pathfinder', '90000',
'Japan', 'SUV')
INTO VEHICLES values(25, 'Nissan', 'Armada', '70000',
'Japan', 'SUV')
INTO VEHICLES values(26, 'Nissan', '2022 Nissan Pathfinder',
'30000', 'Japan', 'SUV')
INTO VEHICLES values(27, 'Nissan', '2019 Nissan Kicks',
'40000', 'Japan', 'SUV')
INTO VEHICLES values(28, 'Nissan', '2018 Nissan Kicks',
'20000', 'Japan', 'SUV')
INTO VEHICLES values(29, 'Nissan', '2017 Nissan Rogue
Sport', '20000', 'Japan', 'SUV')
INTO VEHICLES values(30, 'Nissan', '2020 Nissan Kicks',
'20000', 'Japan', 'SUV')
30. INTO VEHICLES values(31, 'BMW', 'X1 MSRP', '40000',
'USA', 'SUV')
INTO VEHICLES values(32, 'BMW', 'X2 MSRP', '20000',
'USA', 'SUV')
INTO VEHICLES values(33, 'BMW', 'X3 MSRP', '40000',
'USA', 'SUV')
INTO VEHICLES values(34, 'BMW', 'X4 MSRP', '90000',
'USA', 'SUV')
INTO VEHICLES values(35, 'BMW', 'X5 MSRP', '70000',
'Japan', 'SUV')
INTO VEHICLES values(36, 'BMW', 'X6 MSRP', '300000',
'USA', 'SUV')
INTO VEHICLES values(37, 'BMW', 'X7 MSRP', '40000',
'USA', 'SUV')
INTO VEHICLES values(38, 'BMW', 'X MSRP', '20000', 'USA',
'SUV')
INTO VEHICLES values(39, 'Toyota', 'GLA 250 SUV', '20000',
'USA', 'SUV')
INTO VEHICLES values(40, 'Toyota', 'GLA 250 4MATIC
SUV', '20000', 'Japan', 'SUV')
INTO VEHICLES values(41, 'Toyota', 'AMG GLA 35 SUV',
'40000', 'Japan', 'SUV')
INTO VEHICLES values(42, 'Toyota', 'AMG GLA 35 SUV',
'20000', 'Japan', 'SUV')
31. INTO VEHICLES values(43, 'Ford', 'AMG GLA 35 SUV',
'40000', 'USA', 'SUV')
INTO VEHICLES values(44, 'Toyota', 'AMG GLA 45 SUV',
'90000', 'Japan', 'SUV')
INTO VEHICLES values(45, 'Toyota', 'GLB 250 4MATIC
SUV', '70000', 'Japan', 'SUV')
INTO VEHICLES values(46, 'Toyota', 'AMG GLB 35 SUV',
'30000', 'Japan', 'SUV')
INTO VEHICLES values(47, 'Toyota', '4Runner', '40000',
'Japan', 'SUV')
INTO VEHICLES values(48, 'Toyota', 'Highlander', '20000',
'Japan', 'SUV')
INTO VEHICLES values(49, 'Toyota', 'Highlander Hybrid',
'20000', 'Japan', 'SUV')
INTO VEHICLES values(50, 'Toyota', 'RAV4', '20000', 'Japan',
'SUV')
SELECT * FROM DUAL;
SELECT COUNT(*) FROM vehicles;
INSERT ALL
INTO SALES values(1, 400000, 'in stock', 20, '01-APR-98', 2,
4)
32. INTO SALES values(2, 200000, 'sold', 30, '13-Mar-2020', 2, 29)
INTO SALES values(3, 500000, 'available', 40, '01-APR-98', 2,
5)
INTO SALES values(4, 600000, 'sold', 0, '01-APR-98', 2, 7)
INTO SALES values(5, 450000, 'in stock', 0, '01-APR-98', 1, 4)
INTO SALES values(6, 200000, 'sold', 40, '01-APR-98', 2, 4)
INTO SALES values(7, 500000, 'sold', 78, '01-APR-98', 3, 9)
INTO SALES values(8, 600000, 'sold', 50, '01-APR-98', 6, 11)
INTO SALES values(9, 30000, 'in stock', 20, '01-APR-98', 2, 8)
INTO SALES values(10, 200000, 'sold', 20, '01-APR-98', 24,
34)
INTO SALES values(11, 200000, 'sold', 20, '01-APR-98', 25,
44)
INTO SALES values(12, 200000, 'available', 20, '01-APR-98',
22, 36)
INTO SALES values(13, 700000, 'sold', 0, '01-APR-98',32, 32)
INTO SALES values(14, 200000, 'sold', 60, '01-APR-98', 42,39
)
INTO SALES values(15, 500000, 'sold', 78, '01-APR-98', 53,
49)
INTO SALES values(16, 30000, 'in stock', 20, '01-APR-98', 62,
33. 18)
INTO SALES values(17, 200000, 'sold', 20, '01-APR-98', 74,
34)
INTO SALES values(18, 200000, 'sold', 20, '01-APR-98', 15,
44)
INTO SALES values(19, 200000, 'available', 20, '01-APR-98',
92, 6)
INTO SALES values(20, 800000, 'sold', 0, '01-APR-98', 42, 22)
INTO SALES values(21, 400000, 'in stock', 20, '01-APR-98',
29, 24)
INTO SALES values(22, 200000, 'sold', 30, '13-Mar-2020', 26,
29)
INTO SALES values(23, 500000, 'available', 40, '01-APR-98',
23, 45)
INTO SALES values(24, 600000, 'sold', 0, '01-APR-98', 28, 47)
INTO SALES values(25, 450000, 'in stock', 0, '01-APR-98', 51,
4)
INTO SALES values(26, 200000, 'sold', 40, '01-APR-98', 62,
44)
INTO SALES values(27, 500000, 'sold', 78, '01-APR-98', 63,
29)
INTO SALES values(28, 600000, 'sold', 50, '01-APR-98', 6, 11)
INTO SALES values(29, 30000, 'in stock', 20, '01-APR-98', 12,
34. 40)
INTO SALES values(30, 200000, 'sold', 20, '01-APR-98', 94, 4)
INTO SALES values(31, 200000, 'sold', 20, '01-APR-98', 100,
44)
INTO SALES values(32, 200000, 'available', 20, '01-APR-98',
22, 48)
INTO SALES values(33, 700000, 'sold', 0, '01-APR-98', 48, 28)
INTO SALES values(34, 200000, 'sold', 60, '01-APR-98', 72,
48)
INTO SALES values(35, 500000, 'sold', 78, '01-APR-98', 60,
19)
INTO SALES values(36, 30000, 'in stock', 20, '01-APR-98', 2,
48)
INTO SALES values(37, 200000, 'sold', 20, '01-APR-98', 40,
50)
INTO SALES values(38, 200000, 'sold', 20, '01-APR-98', 70,
41)
INTO SALES values(39, 200000, 'available', 20, '01-APR-98',
22,10)
INTO SALES values(40, 700000, 'sold', 0, '01-APR-98', 30, 6)
INTO SALES values(41, 400000, 'in stock', 20, '01-APR-98',
45, 4)
INTO SALES values(42, 200000, 'sold', 30, '13-Mar-2020', 2,
35. 29)
INTO SALES values(43, 500000, 'available', 40, '01-APR-98',
46, 50)
INTO SALES values(44, 600000, 'sold', 0, '01-APR-98', 70, 49)
INTO SALES values(45, 450000, 'in stock', 0, '01-APR-98', 1,
50)
INTO SALES values(46, 200000, 'sold', 40, '01-APR-98', 26,
43)
INTO SALES values(47, 500000, 'sold', 78, '01-APR-98', 33,
39)
INTO SALES values(48, 600000, 'sold', 50, '01-APR-98', 6, 11)
INTO SALES values(49, 30000, 'in stock', 20, '01-APR-98', 25,
8)
INTO SALES values(50, 200000, 'sold', 20, '01-APR-98', 88,
38)
INTO SALES values(51, 200000, 'sold', 20, '01-APR-98', 56,
44)
INTO SALES values(52, 200000, 'available', 20, '01-APR-98',
99, 40)
INTO SALES values(53, 700000, 'sold', 0, '01-APR-98', 11, 22)
INTO SALES values(54, 200000, 'sold', 60, '01-APR-98', 97,
38)
INTO SALES values(55, 500000, 'sold', 78, '01-APR-98', 83, 9)
36. INTO SALES values(56, 30000, 'in stock', 20, '01-APR-98', 67,
3)
INTO SALES values(57, 200000, 'sold', 20, '01-APR-98', 64,
14)
INTO SALES values(58, 200000, 'sold', 20, '01-APR-98', 95,
15)
INTO SALES values(59, 200000, 'available', 20, '01-APR-98',
87, 34)
INTO SALES values(60, 700000, 'sold', 0, '01-APR-98', 100,
42)
INTO SALES values(61, 400000, 'in stock', 20, '01-APR-98',
58, 6)
INTO SALES values(62, 200000, 'sold', 30, '13-Mar-2020', 56,
48)
INTO SALES values(63, 500000, 'available', 40, '01-APR-98',
56, 25)
INTO SALES values(64, 600000, 'sold', 0, '01-APR-98', 89, 34)
INTO SALES values(65, 450000, 'in stock', 0, '01-APR-98', 1,
2)
INTO SALES values(66, 200000, 'sold', 40, '01-APR-98', 2, 4)
INTO SALES values(67, 500000, 'sold', 78, '01-APR-98', 3, 5)
INTO SALES values(68, 600000, 'sold', 50, '01-APR-98', 6, 11)
37. INTO SALES values(69, 30000, 'in stock', 20, '01-APR-98', 2,
7)
INTO SALES values(70, 200000, 'sold', 20, '01-APR-98', 9, 9)
INTO SALES values(71, 200000, 'sold', 20, '01-APR-98', 11,
21)
INTO SALES values(72, 200000, 'available', 20, '01-APR-98',
14, 17)
INTO SALES values(73, 700000, 'sold', 0, '01-APR-98', 15, 21)
INTO SALES values(74, 200000, 'sold', 60, '01-APR-98', 18,
22)
INTO SALES values(75, 500000, 'sold', 78, '01-APR-98', 21,
28)
INTO SALES values(76, 30000, 'in stock', 20, '01-APR-98', 23,
30)
INTO SALES values(77, 200000, 'sold', 20, '01-APR-98', 26,
31)
INTO SALES values(78, 200000, 'sold', 20, '01-APR-98', 28,
32)
INTO SALES values(79, 200000, 'available', 20, '01-APR-98',
29, 33)
INTO SALES values(80, 700000, 'sold', 0, '01-APR-98', 30, 34)
INTO SALES values(81, 400000, 'in stock', 20, '01-APR-98',
31, 35)
38. INTO SALES values(82, 200000, 'sold', 30, '13-Mar-2020', 32,
36)
INTO SALES values(83, 500000, 'available', 40, '01-APR-98',
33, 37)
INTO SALES values(84, 600000, 'sold', 0, '01-APR-98', 34, 38)
INTO SALES values(85, 450000, 'in stock', 0, '01-APR-98', 35,
39)
INTO SALES values(86, 200000, 'sold', 40, '01-APR-98', 36,
40)
INTO SALES values(87, 500000, 'sold', 78, '01-APR-98', 37,
41)
INTO SALES values(88, 600000, 'sold', 50, '01-APR-98', 6, 11)
INTO SALES values(89, 30000, 'in stock', 20, '01-APR-98', 38,
42)
INTO SALES values(90, 200000, 'sold', 20, '01-APR-98', 39,
41)
INTO SALES values(91, 200000, 'sold', 20, '01-APR-98', 40,
42)
INTO SALES values(92, 200000, 'available', 20, '01-APR-98',
41, 43)
INTO SALES values(93, 700000, 'sold', 0, '01-APR-98', 42, 44)
INTO SALES values(94, 200000, 'sold', 60, '01-APR-98', 43,
45)
39. INTO SALES values(95, 500000, 'sold', 78, '01-APR-98', 44,
46)
INTO SALES values(96, 30000, 'in stock', 20, '01-APR-98', 45,
47)
INTO SALES values(97, 200000, 'sold', 20, '01-APR-98', 46,
48)
INTO SALES values(98, 200000, 'sold', 20, '01-APR-98', 47,
49)
INTO SALES values(99, 200000, 'available', 20, '01-APR-98',
48, 50)
INTO SALES values(100, 700000, 'sold', 0, '01-APR-98', 49, 1)
INTO SALES values(101, 400000, 'in stock', 20, '01-APR-98',
50, 2)
INTO SALES values(102, 200000, 'sold', 30, '13-Mar-2020', 51,
3)
INTO SALES values(103, 500000, 'available', 40, '01-APR-98',
52, 4)
INTO SALES values(104, 600000, 'sold', 0, '01-APR-98', 53, 5)
INTO SALES values(105, 450000, 'in stock', 0, '01-APR-98',
54, 6)
INTO SALES values(106, 200000, 'sold', 40, '01-APR-98', 55,
7)
INTO SALES values(107, 500000, 'sold', 78, '01-APR-98', 56,
9)
40. INTO SALES values(108, 600000, 'sold', 50, '01-APR-98', 6,
11)
INTO SALES values(109, 30000, 'in stock', 20, '01-APR-98',
57, 8)
INTO SALES values(110, 200000, 'sold', 20, '01-APR-98', 58,
9)
INTO SALES values(111, 200000, 'sold', 20, '01-APR-98', 59,
10)
INTO SALES values(112, 200000, 'available', 20, '01-APR-98',
60, 11)
INTO SALES values(113, 700000, 'sold', 0, '01-APR-98', 61,
12)
INTO SALES values(114, 200000, 'sold', 60, '01-APR-98', 62,
13)
INTO SALES values(115, 500000, 'sold', 78, '01-APR-98', 63,
14)
INTO SALES values(116, 30000, 'in stock', 20, '01-APR-98',
64, 15)
INTO SALES values(117, 200000, 'sold', 20, '01-APR-98', 65,
16)
INTO SALES values(118, 200000, 'sold', 20, '01-APR-98', 66,
17)
INTO SALES values(119, 200000, 'available', 20, '01-APR-98',
67, 18)
41. INTO SALES values(120, 700000, 'sold', 0, '01-APR-98', 68,
19)
INTO SALES values(121, 400000, 'in stock', 20, '01-APR-98',
69, 20)
INTO SALES values(122, 200000, 'sold', 30, '13-Mar-2020', 70,
21)
INTO SALES values(123, 500000, 'available', 40, '01-APR-98',
71, 22)
INTO SALES values(124, 600000, 'sold', 0, '01-APR-98', 72,
23)
INTO SALES values(125, 450000, 'in stock', 0, '01-APR-98',
74, 22)
INTO SALES values(126, 200000, 'sold', 40, '01-APR-98', 75,
23)
INTO SALES values(127, 500000, 'sold', 78, '01-APR-98', 76,
24)
INTO SALES values(128, 600000, 'sold', 50, '01-APR-98', 6,
11)
INTO SALES values(129, 30000, 'in stock', 20, '01-APR-98',
77, 25)
INTO SALES values(130, 200000, 'sold', 20, '01-APR-98', 78,
26)
INTO SALES values(131, 200000, 'sold', 20, '01-APR-98', 79,
27)
42. INTO SALES values(132, 200000, 'available', 20, '01-APR-98',
80, 28)
INTO SALES values(133, 700000, 'sold', 0, '01-APR-98', 81,
29)
INTO SALES values(134, 200000, 'sold', 60, '01-APR-98', 82,
30)
INTO SALES values(135, 500000, 'sold', 78, '01-APR-98', 84,
31)
INTO SALES values(136, 30000, 'in stock', 20, '01-APR-98',
85, 32)
INTO SALES values(137, 200000, 'sold', 20, '01-APR-98', 86,
33)
INTO SALES values(138, 200000, 'sold', 20, '01-APR-98', 87,
34)
INTO SALES values(139, 200000, 'available', 20, '01-APR-98',
89, 35)
INTO SALES values(140, 700000, 'sold', 0, '01-APR-98', 90,
36)
INTO SALES values(141, 400000, 'in stock', 20, '01-APR-98',
91, 37)
INTO SALES values(142, 200000, 'sold', 30, '13-Mar-2020', 92,
38)
INTO SALES values(143, 500000, 'available', 40, '01-APR-98',
93, 39)
43. INTO SALES values(144, 600000, 'sold', 0, '01-APR-98', 94,
40)
INTO SALES values(145, 450000, 'in stock', 0, '01-APR-98',
95, 41)
INTO SALES values(146, 200000, 'sold', 40, '01-APR-98', 96,
42)
INTO SALES values(147, 500000, 'sold', 78, '01-APR-98', 97,
43)
INTO SALES values(148, 600000, 'sold', 50, '01-APR-98', 6,
11)
INTO SALES values(149, 30000, 'in stock', 20, '01-APR-98',
98, 44)
INTO SALES values(150, 200000, 'sold', 20, '01-APR-98', 99,
45)
INTO SALES values(151, 200000, 'sold', 20, '01-APR-98', 100,
46)
INTO SALES values(152, 200000, 'available', 20, '01-APR-98',
1, 47)
INTO SALES values(153, 700000, 'sold', 0, '01-APR-98', 2, 48)
INTO SALES values(154, 200000, 'sold', 60, '01-APR-98', 3,
49)
INTO SALES values(155, 500000, 'sold', 78, '01-APR-98', 4,
50)
44. INTO SALES values(156, 30000, 'in stock', 20, '01-APR-98', 5,
1)
INTO SALES values(157, 200000, 'sold', 20, '01-APR-98', 6, 2)
INTO SALES values(158, 200000, 'sold', 20, '01-APR-98', 7, 3)
INTO SALES values(159, 200000, 'available', 20, '01-APR-98',
8, 4)
INTO SALES values(160, 700000, 'sold', 0, '01-APR-98', 9, 5)
INTO SALES values(161, 400000, 'in stock', 20, '01-APR-98',
10, 6)
INTO SALES values(162, 200000, 'sold', 30, '13-Mar-2020', 11,
7)
INTO SALES values(163, 500000, 'available', 40, '01-APR-98',
12, 8)
INTO SALES values(164, 600000, 'sold', 0, '01-APR-98', 14, 9)
INTO SALES values(165, 450000, 'in stock', 0, '01-APR-98',
15, 10)
INTO SALES values(166, 200000, 'sold', 40, '01-APR-98', 16,
11)
INTO SALES values(167, 500000, 'sold', 78, '01-APR-98', 17,
12)
INTO SALES values(168, 600000, 'sold', 50, '01-APR-98', 6,
11)
INTO SALES values(169, 30000, 'in stock', 20, '01-APR-98',
45. 18, 13)
INTO SALES values(170, 200000, 'sold', 20, '01-APR-98', 19,
14)
INTO SALES values(171, 200000, 'sold', 20, '01-APR-98', 20,
15)
INTO SALES values(172, 200000, 'available', 20, '01-APR-98',
21, 16)
INTO SALES values(173, 700000, 'sold', 0, '01-APR-98', 22,
17)
INTO SALES values(174, 200000, 'sold', 60, '01-APR-98', 23,
18)
INTO SALES values(175, 500000, 'sold', 78, '01-APR-98', 24,
19)
INTO SALES values(176, 30000, 'in stock', 20, '01-APR-98',
25, 20)
INTO SALES values(177, 200000, 'sold', 20, '01-APR-98', 26,
21)
INTO SALES values(178, 200000, 'sold', 20, '01-APR-98', 27,
22)
INTO SALES values(179, 200000, 'available', 20, '01-APR-98',
28, 23)
INTO SALES values(180, 700000, 'sold', 0, '01-APR-98', 29,
24)
INTO SALES values(181, 400000, 'in stock', 20, '01-APR-98',
46. 30, 25)
INTO SALES values(182, 200000, 'sold', 30, '13-Mar-2020', 31,
26)
INTO SALES values(183, 500000, 'available', 40, '01-APR-98',
32, 27)
INTO SALES values(184, 600000, 'sold', 0, '01-APR-98', 33,
28)
INTO SALES values(185, 450000, 'in stock', 0, '01-APR-98',
34, 29)
INTO SALES values(186, 200000, 'sold', 40, '01-APR-98', 35,
30)
INTO SALES values(187, 500000, 'sold', 78, '01-APR-98', 37,
31)
INTO SALES values(188, 600000, 'sold', 50, '01-APR-98', 6,
11)
INTO SALES values(189, 30000, 'in stock', 20, '01-APR-98',
38, 32)
INTO SALES values(190, 200000, 'sold', 20, '01-APR-98', 39,
31)
INTO SALES values(191, 200000, 'sold', 20, '01-APR-98', 40,
32)
INTO SALES values(192, 200000, 'available', 20, '01-APR-98',
41, 33)
INTO SALES values(193, 700000, 'sold', 0, '01-APR-98', 42,
47. 34)
INTO SALES values(194, 200000, 'sold', 60, '01-APR-98', 43,
34)
INTO SALES values(195, 500000, 'sold', 78, '01-APR-98', 44,
35)
INTO SALES values(196, 30000, 'in stock', 20, '01-APR-98',
45, 36)
INTO SALES values(197, 200000, 'sold', 20, '01-APR-98', 46,
37)
INTO SALES values(198, 200000, 'sold', 20, '01-APR-98', 48,
45)
INTO SALES values(199, 200000, 'available', 20, '01-APR-98',
56, 41)
INTO SALES values(200, 700000, 'sold', 0, '01-APR-98', 59,
38)
SELECT * FROM DUAL;
SELECT COUNT(*) FROM sales;
create table SALESPERSONS (
48. salesperson_ID number not null constraint salesperson_pk
primary key,
title varchar2(60) not null,
LastName varchar2(60) not null,
FirstName varchar2(60) not null,
MI varchar2(1) not null,
hire_date date not null,
dealer_ID number not null
);
create table FINANCING_PLANS (
plan_ID number not null constraint financing_plans_pk
primary key,
min_down number not null,
max_loan_amt number not null,
max_term number not null,
loan_type varchar2(60) not null,
percentage number not null,
insitution varchar2(60) not null
49. );
create table SALES_FINANCINGS (
sale_ID number not null,
plan_ID number not null,
down_pay number not null,
loan_term number not null,
CONSTRAINT fk_sales FOREIGN KEY (sale_ID)
REFERENCES sales(sale_ID),
CONSTRAINT fk_FINANCING_PLANS FOREIGN KEY
(plan_ID) REFERENCES FINANCING_PLANS(plan_ID)
);
INSERT ALL
INTO FINANCING_PLANS values(1, 2000, 30000, 24, 'Simple
Interest Auto', 20, 'Sun Loan Company')
INTO FINANCING_PLANS values(2, 50000, 300000, 36,
'Lease Buyout ', 17, 'America Loan Company')
INTO FINANCING_PLANS values(3, 100000, 500000, 48, 'Pre-
computed Auto ', 16, 'USA Money Today')
50. INTO FINANCING_PLANS values(4, 200000, 700000, 60,
'Lease Buyout ', 15, 'Direct Payday Lenders')
INTO FINANCING_PLANS values(5, 300000, 1000000, 72,
'Title', 13, 'Inheritance Loans USA')
SELECT * FROM DUAL;
INSERT ALL
INTO SALESPERSONS values(1, 'Mr', 'Nelson', 'Freeman',
'N','01-APR-97', 1)
INTO SALESPERSONS values(2, 'Mrs', 'Mary', 'Mader', 'K',
'01-APR-97', 2)
INTO SALESPERSONS values(3, 'Mr', 'William', 'Mack','A',
'01-APR-97', 4)
INTO SALESPERSONS values(4, 'Miss', 'Mary', 'Burbank',
'G','01-APR-97', 3)
INTO SALESPERSONS values(5, 'Mr', 'Enoch', 'Whitman', 'S',
'01-APR-97', 5)
INTO SALESPERSONS values(6, 'Miss', 'Rebecca', 'Gardner',
'H', '01-APR-97', 6)
INTO SALESPERSONS values(7, 'Mr', 'Samuel', 'Hunter', 'J',
'01-APR-97', 7)
INTO SALESPERSONS values(8, 'Mrs', 'Lucerna', 'Harlow', 'L',
'01-APR-97', 8)
51. INTO SALESPERSONS values(9, 'Mr', 'David', 'Freeman', 'F',
'01-APR-97', 10)
INTO SALESPERSONS values(10, 'Mr', 'Desiah', 'Mack', 'B',
'01-APR-97', 1)
SELECT * FROM DUAL;
INSERT ALL
INTO SALES_FINANCINGS values(1, 3, 100000, 48 )
INTO SALES_FINANCINGS values(2, 2, 50000, 36 )
INTO SALES_FINANCINGS values(3, 3, 100000, 48 )
INTO SALES_FINANCINGS values(4, 4, 200000, 60 )
INTO SALES_FINANCINGS values(5, 3, 100000, 48 )
INTO SALES_FINANCINGS values(6, 2, 50000, 36 )
INTO SALES_FINANCINGS values(7, 3, 100000, 48 )
INTO SALES_FINANCINGS values(8, 4, 200000, 60 )
INTO SALES_FINANCINGS values(9, 1, 2000, 24 )
INTO SALES_FINANCINGS values(10, 2, 50000, 36 )
INTO SALES_FINANCINGS values(11, 2, 50000, 36 )
INTO SALES_FINANCINGS values(12, 2, 50000, 36 )
52. INTO SALES_FINANCINGS values(13, 4, 200000, 60 )
INTO SALES_FINANCINGS values(14, 2, 50000, 36 )
INTO SALES_FINANCINGS values(15, 3, 100000, 48 )
INTO SALES_FINANCINGS values(16, 1, 2000, 24 )
INTO SALES_FINANCINGS values(17, 2, 50000, 36 )
INTO SALES_FINANCINGS values(18, 2, 50000, 36 )
INTO SALES_FINANCINGS values(19, 2, 50000, 36 )
INTO SALES_FINANCINGS values(20, 5, 300000, 72 )
INTO SALES_FINANCINGS values(21, 3, 100000, 48 )
INTO SALES_FINANCINGS values(22, 2, 50000, 36 )
INTO SALES_FINANCINGS values(23, 3, 100000, 48 )
INTO SALES_FINANCINGS values(24, 4, 200000, 60 )
INTO SALES_FINANCINGS values(25, 3, 100000, 48 )
INTO SALES_FINANCINGS values(26, 2, 50000, 36 )
INTO SALES_FINANCINGS values(27, 3, 100000, 48 )
INTO SALES_FINANCINGS values(28, 4, 200000, 60 )
INTO SALES_FINANCINGS values(29, 1, 2000, 24 )
INTO SALES_FINANCINGS values(30, 2, 50000, 36 )
53. INTO SALES_FINANCINGS values(31, 2, 50000, 36 )
INTO SALES_FINANCINGS values(32, 2, 50000, 36 )
INTO SALES_FINANCINGS values(33, 4, 200000, 60 )
INTO SALES_FINANCINGS values(34, 2, 50000, 36 )
INTO SALES_FINANCINGS values(35, 3, 100000, 48 )
INTO SALES_FINANCINGS values(36, 1, 2000, 24 )
INTO SALES_FINANCINGS values(37, 2, 50000, 36 )
INTO SALES_FINANCINGS values(38, 2, 50000, 36 )
INTO SALES_FINANCINGS values(39, 2, 50000, 36 )
INTO SALES_FINANCINGS values(40, 4, 200000, 60 )
INTO SALES_FINANCINGS values(41, 3, 100000, 48 )
INTO SALES_FINANCINGS values(42, 2, 50000, 36 )
INTO SALES_FINANCINGS values(43, 3, 100000, 48 )
INTO SALES_FINANCINGS values(44, 4, 200000, 60 )
INTO SALES_FINANCINGS values(45, 3, 100000, 48 )
INTO SALES_FINANCINGS values(46, 2, 50000, 36 )
INTO SALES_FINANCINGS values(47, 3, 100000, 48 )
INTO SALES_FINANCINGS values(48, 4, 200000, 60 )
54. INTO SALES_FINANCINGS values(49, 1, 2000, 24 )
INTO SALES_FINANCINGS values(50, 2, 50000, 36 )
INTO SALES_FINANCINGS values(51, 2, 50000, 36 )
INTO SALES_FINANCINGS values(52, 2, 50000, 36 )
INTO SALES_FINANCINGS values(53, 4, 200000, 60 )
INTO SALES_FINANCINGS values(54, 2, 50000, 36 )
INTO SALES_FINANCINGS values(55, 3, 100000, 48 )
INTO SALES_FINANCINGS values(56, 1, 2000, 24 )
INTO SALES_FINANCINGS values(57, 2, 50000, 36 )
INTO SALES_FINANCINGS values(58, 2, 50000, 36 )
INTO SALES_FINANCINGS values(59, 2, 50000, 36 )
INTO SALES_FINANCINGS values(60, 4, 200000, 60 )
INTO SALES_FINANCINGS values(61, 3, 100000, 48 )
INTO SALES_FINANCINGS values(62, 2, 50000, 36 )
INTO SALES_FINANCINGS values(63, 3, 100000, 48 )
INTO SALES_FINANCINGS values(64, 4, 200000, 60 )
INTO SALES_FINANCINGS values(65, 3, 100000, 48 )
INTO SALES_FINANCINGS values(66, 2, 50000, 36 )
55. INTO SALES_FINANCINGS values(67, 3, 100000, 48 )
INTO SALES_FINANCINGS values(68, 4, 200000, 60 )
INTO SALES_FINANCINGS values(69, 1, 2000, 24 )
INTO SALES_FINANCINGS values(70, 2, 50000, 36 )
INTO SALES_FINANCINGS values(71, 2, 50000, 36 )
INTO SALES_FINANCINGS values(72, 2, 50000, 36 )
INTO SALES_FINANCINGS values(73, 4, 200000, 60 )
INTO SALES_FINANCINGS values(74, 2, 50000, 36 )
INTO SALES_FINANCINGS values(75, 3, 100000, 48 )
INTO SALES_FINANCINGS values(76, 1, 2000, 24 )
INTO SALES_FINANCINGS values(77, 2, 50000, 36 )
INTO SALES_FINANCINGS values(78, 2, 50000, 36 )
INTO SALES_FINANCINGS values(79, 2, 50000, 36 )
INTO SALES_FINANCINGS values(80, 4, 200000, 60 )
INTO SALES_FINANCINGS values(81, 3, 100000, 48 )
INTO SALES_FINANCINGS values(82, 2, 50000, 36 )
INTO SALES_FINANCINGS values(83, 3, 100000, 48 )
INTO SALES_FINANCINGS values(84, 4, 200000, 60 )
56. INTO SALES_FINANCINGS values(85, 3, 100000, 48 )
INTO SALES_FINANCINGS values(86, 2, 50000, 36 )
INTO SALES_FINANCINGS values(87, 3, 100000, 48 )
INTO SALES_FINANCINGS values(88, 4, 200000, 60 )
INTO SALES_FINANCINGS values(89, 1, 2000, 24 )
INTO SALES_FINANCINGS values(90, 2, 50000, 36 )
INTO SALES_FINANCINGS values(91, 2, 50000, 36 )
INTO SALES_FINANCINGS values(92, 2, 50000, 36 )
INTO SALES_FINANCINGS values(93, 4, 200000, 60 )
INTO SALES_FINANCINGS values(94, 2, 50000, 36 )
INTO SALES_FINANCINGS values(95, 3, 100000, 48 )
INTO SALES_FINANCINGS values(96, 1, 2000, 24 )
INTO SALES_FINANCINGS values(97, 2, 50000, 36 )
INTO SALES_FINANCINGS values(98, 2, 50000, 36 )
INTO SALES_FINANCINGS values(99, 2, 50000, 36 )
INTO SALES_FINANCINGS values(100, 4, 200000, 60 )
INTO SALES_FINANCINGS values(101, 3, 100000, 48 )
INTO SALES_FINANCINGS values(102, 2, 50000, 36 )
57. INTO SALES_FINANCINGS values(103, 3, 100000, 48 )
INTO SALES_FINANCINGS values(104, 4, 200000, 60 )
INTO SALES_FINANCINGS values(105, 3, 100000, 48 )
INTO SALES_FINANCINGS values(106, 2, 50000, 36 )
INTO SALES_FINANCINGS values(107, 3, 100000, 48 )
INTO SALES_FINANCINGS values(108, 4, 200000, 60 )
INTO SALES_FINANCINGS values(109, 1, 2000, 24 )
INTO SALES_FINANCINGS values(110, 2, 50000, 36 )
INTO SALES_FINANCINGS values(111, 2, 50000, 36 )
INTO SALES_FINANCINGS values(112, 2, 50000, 36 )
INTO SALES_FINANCINGS values(113, 4, 200000, 60 )
INTO SALES_FINANCINGS values(114, 2, 50000, 36 )
INTO SALES_FINANCINGS values(115, 3, 100000, 48 )
INTO SALES_FINANCINGS values(116, 1, 2000, 24 )
INTO SALES_FINANCINGS values(117, 2, 50000, 36 )
INTO SALES_FINANCINGS values(118, 2, 50000, 36 )
INTO SALES_FINANCINGS values(119, 2, 50000, 36 )
INTO SALES_FINANCINGS values(120, 4, 200000, 60 )
58. INTO SALES_FINANCINGS values(121, 3, 100000, 48 )
INTO SALES_FINANCINGS values(122, 2, 50000, 36 )
INTO SALES_FINANCINGS values(123, 3, 100000, 48 )
INTO SALES_FINANCINGS values(124, 4, 200000, 60 )
INTO SALES_FINANCINGS values(125, 3, 100000, 48 )
INTO SALES_FINANCINGS values(126, 2, 50000, 36 )
INTO SALES_FINANCINGS values(127, 3, 100000, 48 )
INTO SALES_FINANCINGS values(128, 4, 200000, 60 )
INTO SALES_FINANCINGS values(129, 1, 2000, 24 )
INTO SALES_FINANCINGS values(130, 2, 50000, 36 )
INTO SALES_FINANCINGS values(131, 2, 50000, 36 )
INTO SALES_FINANCINGS values(132, 2, 50000, 36 )
INTO SALES_FINANCINGS values(133, 4, 200000, 60 )
INTO SALES_FINANCINGS values(134, 2, 50000, 36 )
INTO SALES_FINANCINGS values(135, 3, 100000, 48 )
INTO SALES_FINANCINGS values(136, 1, 2000, 24 )
INTO SALES_FINANCINGS values(137, 2, 50000, 36 )
INTO SALES_FINANCINGS values(138, 2, 50000, 36 )
59. INTO SALES_FINANCINGS values(139, 2, 50000, 36 )
INTO SALES_FINANCINGS values(140, 4, 200000, 60 )
INTO SALES_FINANCINGS values(141, 3, 100000, 48 )
INTO SALES_FINANCINGS values(142, 2, 50000, 36 )
INTO SALES_FINANCINGS values(143, 3, 100000, 48 )
INTO SALES_FINANCINGS values(144, 4, 200000, 60 )
INTO SALES_FINANCINGS values(145, 3, 100000, 48 )
INTO SALES_FINANCINGS values(146, 2, 50000, 36 )
INTO SALES_FINANCINGS values(147, 3, 100000, 48 )
INTO SALES_FINANCINGS values(148, 4, 200000, 60 )
INTO SALES_FINANCINGS values(149, 1, 2000, 24 )
INTO SALES_FINANCINGS values(150, 2, 50000, 36 )
INTO SALES_FINANCINGS values(151, 2, 50000, 36 )
INTO SALES_FINANCINGS values(152, 2, 50000, 36 )
INTO SALES_FINANCINGS values(153, 4, 200000, 60 )
INTO SALES_FINANCINGS values(154, 2, 50000, 36 )
INTO SALES_FINANCINGS values(155, 3, 100000, 48 )
INTO SALES_FINANCINGS values(156, 1, 2000, 24 )
60. INTO SALES_FINANCINGS values(157, 2, 50000, 36 )
INTO SALES_FINANCINGS values(158, 2, 50000, 36 )
INTO SALES_FINANCINGS values(159, 2, 50000, 36 )
INTO SALES_FINANCINGS values(160, 4, 200000, 60 )
INTO SALES_FINANCINGS values(161, 3, 100000, 48 )
INTO SALES_FINANCINGS values(162, 2, 50000, 36 )
INTO SALES_FINANCINGS values(163, 3, 100000, 48 )
INTO SALES_FINANCINGS values(164, 4, 200000, 60 )
INTO SALES_FINANCINGS values(165, 3, 100000, 48 )
INTO SALES_FINANCINGS values(166, 2, 50000, 36 )
INTO SALES_FINANCINGS values(167, 3, 100000, 48 )
INTO SALES_FINANCINGS values(168, 4, 200000, 60 )
INTO SALES_FINANCINGS values(169, 1, 2000, 24 )
INTO SALES_FINANCINGS values(170, 2, 50000, 36 )
INTO SALES_FINANCINGS values(171, 2, 50000, 36 )
INTO SALES_FINANCINGS values(172, 2, 50000, 36 )
INTO SALES_FINANCINGS values(173, 4, 200000, 60 )
INTO SALES_FINANCINGS values(174, 2, 50000, 36 )
61. INTO SALES_FINANCINGS values(175, 3, 100000, 48 )
INTO SALES_FINANCINGS values(176, 1, 2000, 24 )
INTO SALES_FINANCINGS values(177, 2, 50000, 36 )
INTO SALES_FINANCINGS values(178, 2, 50000, 36 )
INTO SALES_FINANCINGS values(179, 2, 50000, 36 )
INTO SALES_FINANCINGS values(180, 4, 200000, 60 )
INTO SALES_FINANCINGS values(181, 3, 100000, 48 )
INTO SALES_FINANCINGS values(182, 2, 50000, 36 )
INTO SALES_FINANCINGS values(183, 3, 100000, 48 )
INTO SALES_FINANCINGS values(184, 4, 200000, 60 )
INTO SALES_FINANCINGS values(185, 3, 100000, 48 )
INTO SALES_FINANCINGS values(186, 2, 50000, 36 )
INTO SALES_FINANCINGS values(187, 3, 100000, 48 )
INTO SALES_FINANCINGS values(188, 4, 200000, 60 )
INTO SALES_FINANCINGS values(189, 1, 2000, 24 )
INTO SALES_FINANCINGS values(190, 2, 50000, 36 )
INTO SALES_FINANCINGS values(191, 2, 50000, 36 )
INTO SALES_FINANCINGS values(192, 2, 50000, 36 )
62. INTO SALES_FINANCINGS values(193, 4, 200000, 60 )
INTO SALES_FINANCINGS values(194, 2, 50000, 36 )
INTO SALES_FINANCINGS values(195, 3, 100000, 48 )
INTO SALES_FINANCINGS values(196, 1, 2000, 24 )
INTO SALES_FINANCINGS values(197, 2, 50000, 36 )
INTO SALES_FINANCINGS values(198, 2, 50000, 36 )
INTO SALES_FINANCINGS values(199, 2, 50000, 36 )
INTO SALES_FINANCINGS values(200, 4, 200000, 60 )
SELECT * FROM DUAL;
SELECT COUNT(*) FROM sales_financings;
SELECT COUNT(*) , MIN(gross_sale_price),
AVG(gross_sale_price), MAX(gross_sale_price)
FROM sales;
SELECT sales.CustID,
customers.FirstName||' '||customers.LastName as name,
63. customers.Zip FROM sales
INNER JOIN customers
ON customers.CustID=sales.CustID
GROUP BY sales.CustID,customers.FirstName||'
'||customers.LastName,
customers.Zip
HAVING COUNT (sales.CustID) > 1;
SELECT insitution, loan_type FROM
(SELECT sales_financings.plan_ID, financing_plans.insitution,
financing_plans.loan_type,
COUNT(sales_financings.plan_ID) count_sales FROM
sales_financings
INNER JOIN financing_plans
ON sales_financings.plan_ID=financing_plans.plan_ID
GROUP BY
sales_financings.plan_ID,financing_plans.insitution,
financing_plans.loan_type)
WHERE count_sales=(SELECT MAX(count_finance)
FROM (SELECT COUNT(plan_ID) count_finance
FROM sales_financings
64. GROUP BY plan_ID));
SELECT DISTINCT * FROM (SELECT vehicles.make,
customers.*
from sales
INNER JOIN customers
ON sales.CustID=customers.CustID
INNER JOIN vehicles
ON sales.VIN=vehicles.VIN
WHERE vehicles.make=(SELECT vehicles_make FROM
(SELECT count(*) count_sales, vehicles.make vehicles_make
FROM sales
INNER JOIN vehicles
ON sales.VIN=vehicles.VIN
GROUP BY vehicles.make)
WhERE count_sales=(SELECT MAX(count_sales)
FROM (SELECT count(*) count_sales
FROM sales
INNER JOIN vehicles
65. ON sales.VIN=vehicles.VIN
GROUP BY vehicles.make))));
SELECT COUNT(*)
from sales
INNER JOIN customers
ON sales.CustID=customers.CustID
INNER JOIN vehicles
ON sales.VIN=vehicles.VIN
GROUP BY vehicles.model, customers.Zip
ORDER BY COUNT(*) DESC;
create table CUSTOMERS (
CustID number not null constraint customers_pk primary key,
LastName varchar2(60) not null,
FirstName varchar2(60) not null,
MI varchar2(1),
Address varchar2(60) not null,
Street varchar2(60) not null,
66. City varchar2(60) not null,
State varchar2(60) not null,
Zip number not null
);
create table sales (
Sale_ID number not null constraint sales_pk primary key,
gross_sale_price number not null,
vehicle_status varchar2(20) not null,
mileage number not null,
vehicle_date date not null,
CustID number not null,
VIN number not null
);
create table VEHICLES (
VIN number not null constraint vehicles_pk primary key,
model varchar2(60) not null,
67. make varchar2(60) not null,
wholesale_cost varchar2(10) not null,
wherefrom varchar2(60) not null,
type varchar2(60) not null
)
;
INSERT ALL
INTO CUSTOMERS values(123, 'Nelson', 'Freeman', 'N', '614-
601-5147', 'Abdella Way', 'New York', 'New york',12345)
INTO CUSTOMERS values(16, 'Mary', 'Mader', 'K', '614-624-
6628', 'Alwyne Avenue', 'Philadelphia', 'Philadelphia', 43441)
INTO CUSTOMERS values(3, 'William', 'Mack','A', '330-949-
2522', 'Arcadia Lakes Drive', 'Alaska', 'Alaska', 23423)
INTO CUSTOMERS values(4, 'Mary', 'Burbank', 'G','330-512-
9725', 'Arruda Terrace', 'Summerville', 'Alabama', 22323)
INTO CUSTOMERS values(7, 'Enoch', 'Whitman', 'S', '216-848-
9837', 'Atwood Way', 'Texas', 'Texas', 33234)
INTO CUSTOMERS values(8, 'Rebecca', 'Gardner', 'H', '210-
332-4332','Avila Place', 'Rosecounty', 'Nevada',67733)
INTO CUSTOMERS values(2, 'Samuel', 'Hunter', 'J', '513-395-
69. ;
INSERT ALL
INTO SALES values(1, 400000, 'in stock', 20, '01-APR-98', 12,
34)
INTO SALES values(2, 200000, 'sold', 30, '13-Mar-2020', 32,
64)
INTO SALES values(3, 500000, 'available', 40, '01-APR-98',
42, 84)
INTO SALES values(5, 600000, 'sold', 0, '01-APR-98', 52, 74)
INTO SALES values(13, 450000, 'in stock', 0, '01-APR-98', 1,
4)
INTO SALES values(41, 200000, 'sold', 40, '01-APR-98', 82, 4)
INTO SALES values(91, 500000, 'sold', 78, '01-APR-98', 73,
94)
INTO SALES values(51, 20000, 'in stock', 20, '01-APR-98', 92,
84)
INTO SALES values(14, 200000, 'sold', 20, '01-APR-98', 124,
534)
INTO SALES values(16, 200000, 'sold', 20, '01-APR-98', 125,
734)
INTO SALES values(19, 200000, 'available', 20, '01-APR-98',
212, 234)
70. INTO SALES values(198, 700000, 'sold', 0, '01-APR-98', 912,
934)
INTO SALES values(12, 200000, 'sold', 60, '01-APR-98', 152,
834)
SELECT * FROM DUAL;
INSERT ALL
INTO VEHICLES values(1, 'Toyota', 'SUV', '20000', 'Japan',
'SUV')
INTO VEHICLES values(2, 'Ford', 'SUV', '40000', 'USA',
'SUV')
INTO VEHICLES values(3, 'Toyota', 'SUV', '90000', 'Japan',
'SUV')
INTO VEHICLES values(4, 'Toyota', 'SUV', '70000', 'Japan',
'SUV')
INTO VEHICLES values(5, 'Toyota', 'SUV', '30000', 'Japan',
'SUV')
INTO VEHICLES values(6, 'Toyota', 'SUV', '40000', 'Japan',
'SUV')
INTO VEHICLES values(7, 'Toyota', 'SUV', '20000', 'Japan',
'SUV')
INTO VEHICLES values(8, 'Toyota', 'SUV', '20000', 'Japan',
'SUV')
71. INTO VEHICLES values(9, 'Toyota', 'SUV', '20000', 'Japan',
'SUV')
INTO VEHICLES values(10, 'Toyota', 'SUV', '520000', 'Japan',
'SUV')
INTO VEHICLES values(11, 'Toyota', 'SUV', '40000', 'Japan',
'SUV')
SELECT * FROM DUAL;
select * from sales;
select * from customers;
select * from vehicles;
Create Table
query
CREATE TABLE CUSTOMERS
(
cust_ID NUMBER(10) NOT NULL,
72. first_name VARCHAR2(20) NOT NULL,
MI VARCHAR2(2),
last_name VARCHAR2(20) NOT NULL,
street VARCHAR2(40) NOT NULL,
address VARCHAR2(40) NOT NULL,
city VARCHAR2(20) NOT NULL,
state VARCHAR2(20) NOT NULL,
zip_code NUMBER(6) NOT NULL,
name VARCHAR2(20) NOT NULL,
profile NUMBER(10) NOT NULL,
email VARCHAR2(20) NOT NULL,
CONSTRAINT customers_pk PRIMARY KEY(cust_ID)
)
CREATE TABLE VEHICLES (
VIN NUMBER(10) NOT NULL,
type VARCHAR2(10) NOT NULL,
model VARCHAR2(20) NOT NULL,
make VARCHAR2(20) NOT NULL,
wholesale_cost NUMBER(10) NOT NULL,
wherefrom VARCHAR2(20) NOT NULL,
trade_ID VARCHAR2(10) NOT NULL,
CONSTRAINT vehicles_pk PRIMARY KEY (VIN)
)
CREATE TABLE SALE (
sale_ID DATE,
vehicle_status VARCHAR2(10) NOT NULL,
date VARCHAR2(20) NOT NULL,
mileage VARCHAR2(20) NOT NULL,
cust_ID VARCHAR2(10) NOT NULL,
VIN NUMBER(10) NOT NULL,
salesperson_ID VARCHAR2(10) NOT NULL,
gross_sale_price NUMBER(10,2) NOT NULL,
CONSTRAINT sales_pk PRIMARY KEY (sale_ID),
73. CONSTRAINT fk_customers
Foreign KEY (cust_ID) REFERENCES customers(cust_ID),
CONSTRAINT fk_vehicles FOREIGN KEY (VIN)
REFERENCES VEHICLES(VIN)
)
Add foreign key
Project 3
In this assignment you will be performing some additional
queries against your Online Vehicle Sales (OVS), Inc. online
transaction processing (OLTP) database and also creating some
simple anonymous PL/SQL blocks.
You will also begin the creation of a data warehouse database
for Online Vehicle Sales (OVS), Inc. The full data warehouse is
comprised of 4 dimension tables and a fact table based on the
Star Schema diagram posted in LEO’s Week #6 area. Your
OLTP database tables and star schema tables will reside in the
same Oracle schema.
This assignment is based on the fully populated tables from
Homework #2 so it assumes you’ve completed all work for that
74. assignment.
You can perform this assignment based on a database on
UGMC’s Virtual Lab Broker.
You should use one or more SQL script files to complete this
assignment. Your script files should contain all your SQL and
PL/SQL code.
Here are the specific assignment steps. In order to earn full
credit you must keep your steps in order, number your steps,
and put everything in a single file.
1) Execute SELECT COUNT(*) FROM <table_name>;
statements for all 6 of your OVS, Inc. OLTP tables. You should
have at least the following counts: CUSTOMERS table – 100
rows, VEHICLES table – 50 rows, SALESPERSONS table – 10
rows, FINANCING_PLANS - 5 rows, SALES table – 200 rows,
and SALES_FINANCINGS table - 200 rows.
2) Via a single SELECT query display the zip code, make, and
count with the largest total car purchases for a zip code and
make combination (there may be a tie with two or more). Show
the SQL statement you used and the results returned by Oracle
from executing your SQL statement right after the statement.
3) Develop a PL/SQL anonymous block that displays the total
sales for a zip code for a specific zip code. You may use any of
your zip codes you wish. Show the PL/SQL statements in your
block, the actual execution of your block, and the results
returned.
4) Develop a PL/SQL anonymous block that displays the zip
code with the largest total car purchases. Since there can be a
tie with two or more zip codes, ensure that the lowest numeric
zip code is displayed. Show the PL/SQL statements in your
block, the actual execution of your block, and the results
returned.
5) This step begins the creation of your data warehouse. Ensure
that your FINANCING_PLANS table has already been created
and populated via a “SELECT * FROM financing_plans;” SQL
query. This table is used by both your OLTP database and
75. serves as a dimension table in the star schema of your data
warehouse database. Your Plan_ID primary key is the
Plan_Code column. Don't worry about changing this to
Plan_Code or changing any other column names you already
have.
6) Create the DEALERSHIPS star schema dimension table via
SQL. Add at least 2 rows of data via INSERT statement(s).
After populating your DEALERSHIPS table execute a "SELECT
* FROM dealerships;” SQL statement to display the entire
contents. Show all your SQL code for this step and the Oracle
results from executing it.
7) Create the VEHICLES star schema dimension table via SQL.
Change your existing OLTP VEHICLES table to
OLTP_VEHICLES via the SQL RENAME command and change
your SALES table’s foreign key to reference this new table
name. For the Vehicle_Code primary key column use an Oracle
sequence to populate the values. For the Description column use
all concatenated combinations of Make and Model of vehicles
you have. Use a PL/SQL block to populate the Description
column by SELECTing the combinations from your
OLTP_VEHICLES table and then INSERTing the combinations
into your new VEHICLES table, which would best be performed
via a cursor in a loop. After populating your VEHICLES table
execute a "SELECT * FROM vehicles ORDER BY
vehicle_code" SQL statement to display the entire contents.
Your submission MUST include one or more .sql files. Please
name them with your last name, project, and order to run them.
For example: Smith_Project_2_Part_A.sql. Also include drop
scripts to un-do the scripts. For example:
Smith_Project_2_Part_A_drop.sql.
Project 3 grading rubric
Attribute
Meets
Does Not Meet
CREATE TABLE SQL statements
76. 35 points
Uses an SQL script file.
Creates the DEALERSHIPS star schema dimension table.
Creates the VEHICLES star schema dimension table.
Changes your existing OLTP VEHICLES table to
OLTP_VEHICLES via the SQL RENAME command and change
your SALES table’s foreign key to reference this new table
name.
Uses an Oracle sequence to populate the Vehicle_Code values.
Uses all concatenated combinations of Make and Model of
vehicles for the Description column.
Uses an Oracle RDBMS.
All SQL statements are syntactically correct and execute
without error.
0 points
Does not use an SQL script file.
Does not create the DEALERSHIPS star schema dimension
table.
Does not create the VEHICLES star schema dimension table.
Does not change your existing OLTP VEHICLES table to
OLTP_VEHICLES via the SQL RENAME command or change
your SALES table’s foreign key
to reference this new table name.
Does not use an Oracle sequence to populate the Vehicle_Code
values.
Does not use all concatenated combinations of Make and Model
of vehicles for the Description column.
Does not use an Oracle RDBMS.
All SQL statements are not syntactically correct or execute
without error.
INSERT SQL statements
10 points
Adds at least 2 rows of data via INSERT statement(s) to the
DEALERSHIPS Star schema table.
All SQL statements are syntactically correct and execute
without error.
77. 0 points
Does not add at least 2 rows of data via INSERT statement(s) to
the DEALERSHIPS Star schema table.
All SQL statements are not syntactically correct or execute
without error.
SELECT SQL statements
5 points
Executes SELECT COUNT(*) FROM <table_name>; for all
OLT tables resulting in expected counts.
Via a single SELECT query display the zip code, make, and
count with the largest total car purchases for a zip code and
make combination.
Ensures that your FINANCING_PLANS table has already been
created and populated via a “SELECT * FROM
financing_plans.
After populating your DEALERSHIPS table execute a "SELECT
* FROM dealerships;”
After populating your VEHICLES table execute a "SELECT *
FROM vehicles ORDER BY vehicle_code".
All SQL statements are syntactically correct and execute
without error.
0 points
Does not execute SELECT COUNT(*) FROM <table_name>;
for all OLT tables resulting in expected counts.
Does not, via a single SELECT query, display the zip code,
make, and count with the largest total car purchases for a zip
code and make combination.
Does not ensure that your FINANCING_PLANS table has
already been created and
populated via a “SELECT * FROM financing_plans.
Does not, After populating your DEALERSHIPS table execute a
"SELECT * FROM dealerships;”
Does not, after populating your VEHICLES table execute a
"SELECT * FROM vehicles ORDER BY vehicle_code".
All SQL statements are syntactically correct and execute
without error.
78. All SQL statements are not syntactically correct or execute
without error.
PL/SQL anonymous blocks
40 points
Develops a PL/SQL anonymous block that displays the total
sales for a zip code for a specific zip code.
Develops a PL/SQL anonymous block that displays the zip code
with the largest total car purchases.
Ensures that the lowest numeric zip code is displayed.
Uses a PL/SQL block to populate the Description column by
SELECTing the combinations from your OLTP_VEHICLES
table and then INSERTing the combinations into your new
VEHICLES table, which would best be performed via a cursor
in a loop.
0 points
Does not develop a PL/SQL anonymous block that displays the
total sales for a zip code for a specific zip code.
Does not develop a PL/SQL anonymous block that displays the
zip code with the largest total car purchases.
Does not ensure that the lowest numeric zip code is displayed.
Does not use a PL/SQL block to populate the Description
column by SELECTing the combinations from your
OLTP_VEHICLES table and then INSERTing the combinations
into your new VEHICLES table, which would best be performed
via a cursor in a loop.
SQL script file(s)
10 points
Submits SQL script file(s).
Demonstrates DROP TABLE, CREATE TABLE, and ALTER
TABLE SQL statements as they executed and the Oracle
responses.
Demonstrates INSERT SQL statements as they executed and the
Oracle responses.
Displays the contents of all tables from SELECT * FROM
tablename; statements.
Displays all single SELECT statements queries.
79. Displays all PL/SQL code and execution.
0 points
Does not submits SQL script file(s).
Does not demonstrate DROP TABLE, CREATE TABLE, and
ALTER TABLE SQL statements as they executed and the
Oracle responses.
Does not demonstrate INSERT SQL statements as they executed
and the Oracle responses.
Does not display the contents of all tables from SELECT *
FROM tablename; statements.
Does not display all single SELECT statements queries.
Does not display all PL/SQL code and execution.