SlideShare una empresa de Scribd logo
1 de 18
CREATE TABLE OFFICES (
OFFICEID INT,
CITY VARCHAR(20),
REGION VARCHAR(12),
MGRIDINT,
TARGET DECIMAL (9,2),
SALES DECIMAL (9,2),
CONSTRAINT DEPTNO_PK PRIMARY KEY (OFFICEID)
);
CREATE TABLE SALESREPS (
REPID INT,
NAME VARCHAR(25),
HIREDATE DATE,
QUOTA DECIMAL (9,2),
SALES DECIMAL (9,2),
OFFICEID INT NOT NULL,
CONSTRAINT REP_OFFICE_FK FOREIGN KEY (OFFICEID)
REFERENCES OFFICES (OFFICEID),
CONSTRAINT EMP_PRIMARY_KEY PRIMARY KEY
(REPID));
CREATE TABLE CUSTOMERS (
CUSTID INT,
COMPANY VARCHAR(25),
PHONE VARCHAR(10),
CREDITLIMIT DECIMAL(7,2),
CUSTREPID INT NOT NULL,
CONSTRAINT CUST_REPID_FK FOREIGN KEY
(CUSTREPID) REFERENCES SALESREPS (REPID),
CONSTRAINT CUSTOMER_PRIMARY_KEY PRIMARY KEY
(CUSTID));
CREATE TABLE PRODUCTS (
PRODUCTID VARCHAR(5),
DESCRIPTION VARCHAR(25),
PRODUCTPRICE decimal(8,2),
QUANTITY_ON_HAND INT,
CONSTRAINT PRODUCT_PK PRIMARY
KEY(PRODUCTID));
CREATE TABLE ORDERS (
ORDID INT,
CUSTID INT NOT NULL,
ORDERDATE DATE,
PRODUCTID VARCHAR(5),
REPID INT,
QTY INT,
TOTALAMT DECIMAL (9,2),
CONSTRAINT ORDERS_CUSTID_FK FOREIGN KEY
(CUSTID) REFERENCES CUSTOMERS (CUSTID),
CONSTRAINT ORDERS_PRODUCTID_FK FOREIGN KEY
(PRODUCTID) REFERENCES PRODUCTS (PRODUCTID),
CONSTRAINT ORDERS_REPID_FK FOREIGN KEY (REPID)
REFERENCES SALESREPS (REPID),
CONSTRAINT ORDERS_PK PRIMARY KEY (ORDID));
INSERT INTO OFFICES VALUES
(22,'Denver','Western',6,300000,186042),
(11,'New York','Eastern',9,575000,692637),
(12,'Chicago','Eastern',NULL,800000,735042),
(13,'Atlanta','Eastern',1,350000,367911),
(14,'Los Angeles','Western',5,600000,550000);
INSERT INTO SALESREPS VALUES
(1,'Bill Adams','2008-10-11',350000,367911,13),
(2,'Mary Jones','2013-01-04',200000,234877,13),
(3,'Sue Smith','2009-06-15',250000,145000,12),
(4,'Sam Clark','2011-08-23',250000,287000,14),
(5,'Bob Randolf','2013-03-12',180000,100000,14),
(6,'Dan Roberts','2013-03-12',180000,157987,22),
(7,'Tom Synder','2012-03-30',200000,211000,22),
(8,'Larry Fitch','2012-05-20',240000,340897,13),
(9,'Paul Cruz','2011-10-19',340000,600000,11),
(10,'Nancy Angelli','2005-02-05',400000,800023,11);
Insert into CUSTOMERS values
(2111,'JCP Inc','4569483748',50000,8),
(2102,'First Corp','9148425732',65000,8),
(2103,'Division Mfg.','8374475757',50000,5),
(2123,'Carter and Sons','8373466321',40000,7),
(2107,'Ace International','3113467785',35000,2),
(2115,'Smithson Corp.','2016478446',20000,3),
(2101,'Jones Mfg.','3114467257',65000,1),
(2112,'Zetacorp','3483746293',50000,1),
(2121,'QMA Assoc.','2017831028',45000,5),
(2114,'Orion Corp.','2013482730',20000,5),
(2124,'Peter Brothers','3104758374',40000,2),
(2108,'Holm & Landis','3108946655',55000,2),
(2117,'J.P. Sinclair','3486769013',35000,1),
(2122,'Three-Way Lines','4059898888',30000,10),
(2120,'Rico Enterprises','7874568930',50000,10),
(2106,'Fred Lewis Corp.','8183847777',650000,6),
(2119,'Solomon Inc.','8189993847',250000,6),
(2118,'Midwest Systems','3279121212',600000,4),
(2113,'Ian & Schmidt','2839488877',250000,4),
(2105,'AAA Investments','2018373444',45000,7),
(2110,'Top of the Line','3458837465',30000,9),
(2126,'Holders Inc.','5607822121',25000,9);
insert into PRODUCTS values
('2A45C','Deluxe Driller',1290.99,12),
('4100Y','Welder',2343.99,24),
('XK47','Reducer',1854.00,100),
('41672','Ionizer',1456.45,34),
('779C','Standard Driller',900.00,10),
('41003','Fabricator',3156.00,5),
('41004','Granite Saw ',345.00,54),
('112','Dumper',1567.00,21),
('2A447','Size 2 Pumper',2399.50,10),
('114','Size 1 Pump',1500.00,20),
('2A44R','Recycler',3589.29,15),
('41002','Bender',5634.99,4),
('4100Z','Compressor',1239.20,10),
('773C','Air Filtering Machine',1111.50,4),
('775C','Suction Adaptor',213.00,25),
('2A44L','Generator I', 5600.00,10);
insert into ORDERS values
(112961,2117,'2017-01-02','2A44L',2,6,33600),
(113012,2111,'2017-01-03','41003',2,2,6312),
(112989,2101,'2017-01-03','114',1,1,1567.00),
(113051,2118,'2017-01-04','XK47',2,4,7416.00),
(112968,2102,'2017-01-04','41004',4,10,3450.00 ),
(113036,2107,'2017-01-05','4100Z',6,2,2478.40),
(113045,2112,'2017-01-05','2A44R',1,1,3589.29),
(112963,2103,'2017-01-05','41004',5,10,3450.00),
(113013,2118,'2017-01-06','41003',5,1,3156.00),
(113058,2108,'2017-01-06','112',4,1,1567.00),
(112997,2124,'2017-02-02','41003',6,2,6312.00),
(112983,2103,'2017-02-02','41004',2,6,1280.00),
(113024,2114,'2017-02-02','XK47',1,6,11124.00),
(113062,2124,'2017-02-06','114',5,2,3000.00),
(112979,2114,'2017-02-12','4100Z',5,11,13631.20),
(113027,2103,'2017-02-12','41002',6,1,5634.99),
(113007,2112,'2017-02-15','773C',2,3,33345.50),
(113069,2109,'2017-02-15','775C',7,22,4686.00),
(113034,2107,'2017-02-16','2A45C',7,2,2581.98),
(112992,2118,'2017-03-01','41002',8,1,5634.99),
(112975,2111,'2017-03-01','2A44L',6,6,2260.90),
(113055,2108,'2017-03-02','4100X',1,2,11200.00),
(113048,2120,'2017-03-02','779C',5,4,2700.00),
(112993,2106,'2017-03-02','2A45C',5,10,12999.99),
(113065,2106,'2017-03-03','XK47',6,3,5562.00),
(113003,2108,'2017-03-03','779C',3,3,2700.90),
(113049,2118,'2017-03-15','XK47',3,15,27810.00),
(112987,2103,'2017-03-16','4100Y',4,1,2343.99),
(113057,2111,'2017-03-16','4100Z',4,1,1239.20),
(113042,2111,'2017-03-16','2A44R',1,2,7178.58);
Unit 2 Fleet Safety
Journal entry: What are your thoughts on analyzing costs that
affect a fleet's safety culture? Write about the pros and cons of
performing a cost-benefit analysis within an organization.
Your journal entry must be at least 200 words. No references or
citations are necessary.
Question 1
Identify which of the answers below is used by a company's
management team in determining the non-labor costs per mile as
applied to a fleet vehicle.
Repair wages
Fuel taxes
Supervision
Driver history
Question 2
What are recognized as the three main types of driver
distractions?
Cognitive, visual, and manual
Manual, visual, and speed
Operation, equipment failures, and visual
Passenger interaction, eating, and manual
Question 3
Which of the following is NOT utilized in determining the time
when it is more cost effective to replace a fleet vehicle than to
continue to maintain it?
Maintenance data
Cost from fuel, oil, lube, and filter
Mileage logs
Driver history
Question 4
Which of the following is NOT a stage in the construction of
the safety, health, and environmental economic analysis model?
Analysis of definitions and boundary
Inventory analysis and impact assessment
Postimplementation look-back
Outline development
Question 5
In conducting the impact assessment on a company's economic
analysis of the fleet, which of the following chief factors should
NOT be included in the assessment?
Human operational capability
Financial funding capability
Support personnel
Available technology
Question 6
Describe how the Safety Measurement System (SMS) assists
companies with identifying the seven most important safety
issues that drivers face and determining which solutions are
applicable to improve driver performance.
Your response should be at least 75 words in length.
Question 7
Explain how reactive strategies can negatively impact safety
measures and training within an organization that controls fleet
operations. How can proactive determinations help mitigate
future on-the-job accidents and reduce the overall impact of the
cost to the company from safety issues?
Your response should be at least 75 words in length.
Question 8
There are multiple direct and indirect costs to employers who
manage fleets when on-the-job accidents happen with
employees. Calculate the total cost to an employer whose driver
was involved in an accident with $8,459 of direct costs. Provide
examples of indirect costs used in your calculation. Show your
calculations.
Your response should be at least 75 words in length.
Question 9
Describe how companies can utilize a cost-benefit analysis to
effectively budget for future safety training within the
organization.
Your response should be at least 75 words in length.
CIS336: Lab 6: Group Functions and Subqueries
LAB OVERVIEW
Scenario and Summary
Lab 6 will introduce the concept of group functions and
subqueries to meet more complex report requirements. This lab
may be completed using either DeVry’s Omnymbus EDUPE-
APP lab environment, or a local copy of the MySQL database
running on your own computer using the ACME database tables.
The lab will utilize a set of tables that are created and populated
by the script file (create_ACME_db.sql).
A few IMPORTANT things to note if using EDUPE MySQL:
**There can be NO SPACES in alias names given to a column.
For example:
Select unit_price as “Retail Price “ from items; --this does
NOT work in EDUPE MySQL.
Any of the following WILL WORK:
Select unit_price as "RetailPrice" from items;
Select unit_price as "Retail_Price" from items;
Select unit_price as Retail_Price from items;
Select unit_price as RetailPrice from items;
**Any calculated fields MUST be given an alias (and note
above NO SPACES in alias). For example:
select unit_price * 2 from items; --this does NOT work in
EDUPE MySQL
This will work:
select unit_price * 2 as NewPrice from items;
Deliverables
· Lab Report (Answer Sheet) containing both the student-
created SQL command(s) for each exercise, and the output
showing the results obtained. Be sure your LAST NAME is on
the file.
LAB STEPS: Complete each of the exercises below.
1. Write a query to determine the total number of orders for
each customer. Display the order id and display the total with a
heading of TotalOrders (note no spaces).
2. Write a query to determine the number of customers for each
sales rep. Display the sales rep ID and display the total with a
heading of TotalCustomers. Sort the display by sales rep ID.
3. Write a query to determine the total number of sales reps in
offices 22 and the total number of sales reps in office 13.
Display the office Id and display the total number of reps with a
heading of Total_Reps.
4. Write a query to determine the total number of customers for
these sales reps: Sales rep 5, 1, and 8. Display the sales rep Id
and display the total number of customers with a heading of
Total_Customers.
5. Write a query to determine the total number of customers for
each of the Sales Reps. But only display the sales reps and their
number of customers if that total number of customers is greater
than 2. Display the total with a heading of Total_Customers.
6. Write a query to determine the total number of customers for
each of the Sales Reps that have a creditlimit that is greater
than 40,000. But only display the sales reps and their number of
customers if that total number of customers is greater than 1.
Display the total number of customers with a heading of
Total_Customers.
7. Write a query to determine the total dollar amount of all
purchases for each customer. Display the customer Id and the
total dollar amount of all purchases for each customer. Sort by
customer id.
8. Write a query to determine the total dollar amount of all
purchases for ONLY customers 2114, 2103, and 2108. Give the
total purchase amount a heading of TotalSalesAmount. Display
the customer Id and the total dollar amount of purchases for
each customer id . Sort by the total sales.
9. Write a query to determine the total dollar amount of all
purchases for all customers. But instead of displaying the
custid, display the customer company name (You need a join).
Give the total purchase amount a heading of TotalSalesAmount.
Display the customer company name and the total dollar amount
of purchases for each company.
10. Re-do the previous problem but only display those company
names that have a total purchase amount that is greater than
$20000. Only display the company names.
11. Display the average purchase order amount for the
customers. Round the amount to two decimals.
12. Display the number of products ACME sells and what the
average price is for their products.
13. Write a query to display the description of a product and the
number of orders for that product. Sort the display by the
description.
14. Redo the previous problem but this time just display those
product names and the number of sales that have more than 3
sales.
15. Use a SubQuery to determine which sales reps have a sale
that is greater than the average sale. Display the sales rep ID.
Only show the sales rep ID once.
16. Use a SubQuery to display the city of all offices whose sales
are below the average target for all the offices.
17. Use a SubQuery to list all sales rep IDs that have an average
sales dollar amount greater the average sales dollar amount of
the sales reps. You can use a correlated sub query or an
correlated subquery. You need a correlated sub query if you
wish to compare the average sales dollar amount to the average
sales dollar amount to all the other sales reps NOT including the
the sales rep you are comparing to.
This is the end of Lab 6.
CIS336 Lab 6 InstructionsPage 2
CIS336: Lab 6 Answer Sheet
Your name ______________________
Just copy and paste a few rows if the output is very long.
Solution
1:
~Paste your solution query here~
~Paste your solution query results text here~

Más contenido relacionado

Similar a CREATE TABLE OFFICES ( OFFICEID INT, CITY .docx

A G S006 Little 091807
A G S006  Little 091807A G S006  Little 091807
A G S006 Little 091807Dreamforce07
 
The ultimate-guide-to-sql
The ultimate-guide-to-sqlThe ultimate-guide-to-sql
The ultimate-guide-to-sqlMcNamaraChiwaye
 
Database Design Project-Oracle 11g
Database Design  Project-Oracle 11g Database Design  Project-Oracle 11g
Database Design Project-Oracle 11g Sunny U Okoro
 
What is transaction processing
What is transaction processingWhat is transaction processing
What is transaction processingjohann11372
 
In hau lee's uncertainty framework to classify supply chains
In hau lee's uncertainty framework to classify supply chainsIn hau lee's uncertainty framework to classify supply chains
In hau lee's uncertainty framework to classify supply chainsjohann11371
 
The ultimate-guide-to-sql
The ultimate-guide-to-sqlThe ultimate-guide-to-sql
The ultimate-guide-to-sqlMcNamaraChiwaye
 
For an infinite queuing situation
For an infinite queuing situationFor an infinite queuing situation
For an infinite queuing situationjohann11370
 
An assumption of learning curve theory is which of the following
An assumption of learning curve theory is which of the followingAn assumption of learning curve theory is which of the following
An assumption of learning curve theory is which of the followingjohann11370
 
Documentation on bigmarket copy
Documentation on bigmarket   copyDocumentation on bigmarket   copy
Documentation on bigmarket copyswamypotharaveni
 
UOPOPS571 Lessons in Excellence--uopops571.com
UOPOPS571 Lessons in Excellence--uopops571.comUOPOPS571 Lessons in Excellence--uopops571.com
UOPOPS571 Lessons in Excellence--uopops571.comthomashard90
 
CIS 115 Inspiring Innovation/tutorialrank.com
 CIS 115 Inspiring Innovation/tutorialrank.com CIS 115 Inspiring Innovation/tutorialrank.com
CIS 115 Inspiring Innovation/tutorialrank.comjonhson110
 
A company's production process
A company's production processA company's production process
A company's production processnever1240
 
Which of the following is an input to the master production schedule (mps)
Which of the following is an input to the master production schedule (mps)Which of the following is an input to the master production schedule (mps)
Which of the following is an input to the master production schedule (mps)johann11374
 
A company's production process has an 80 percent learning curve rate
A company's production process has an 80 percent learning curve rateA company's production process has an 80 percent learning curve rate
A company's production process has an 80 percent learning curve rateyearstart1
 
A company's production process has an 80 percent learning curve rate
A company's production process has an 80 percent learning curve rateA company's production process has an 80 percent learning curve rate
A company's production process has an 80 percent learning curve rateramuaa124
 
Smu mba sem 3 om fall 2015 assignments
Smu mba sem 3 om fall 2015 assignmentsSmu mba sem 3 om fall 2015 assignments
Smu mba sem 3 om fall 2015 assignmentssolved_assignments
 
A p chart to monitor process quality
A p chart to monitor process qualityA p chart to monitor process quality
A p chart to monitor process qualityjohann11369
 
What is transaction processing
What is transaction processingWhat is transaction processing
What is transaction processingramuaa128
 
Which of the following is a focusing step
Which of the following is a focusing stepWhich of the following is a focusing step
Which of the following is a focusing stepjohann11373
 

Similar a CREATE TABLE OFFICES ( OFFICEID INT, CITY .docx (20)

A G S006 Little 091807
A G S006  Little 091807A G S006  Little 091807
A G S006 Little 091807
 
The ultimate-guide-to-sql
The ultimate-guide-to-sqlThe ultimate-guide-to-sql
The ultimate-guide-to-sql
 
1 z1 051
1 z1 0511 z1 051
1 z1 051
 
Database Design Project-Oracle 11g
Database Design  Project-Oracle 11g Database Design  Project-Oracle 11g
Database Design Project-Oracle 11g
 
What is transaction processing
What is transaction processingWhat is transaction processing
What is transaction processing
 
In hau lee's uncertainty framework to classify supply chains
In hau lee's uncertainty framework to classify supply chainsIn hau lee's uncertainty framework to classify supply chains
In hau lee's uncertainty framework to classify supply chains
 
The ultimate-guide-to-sql
The ultimate-guide-to-sqlThe ultimate-guide-to-sql
The ultimate-guide-to-sql
 
For an infinite queuing situation
For an infinite queuing situationFor an infinite queuing situation
For an infinite queuing situation
 
An assumption of learning curve theory is which of the following
An assumption of learning curve theory is which of the followingAn assumption of learning curve theory is which of the following
An assumption of learning curve theory is which of the following
 
Documentation on bigmarket copy
Documentation on bigmarket   copyDocumentation on bigmarket   copy
Documentation on bigmarket copy
 
UOPOPS571 Lessons in Excellence--uopops571.com
UOPOPS571 Lessons in Excellence--uopops571.comUOPOPS571 Lessons in Excellence--uopops571.com
UOPOPS571 Lessons in Excellence--uopops571.com
 
CIS 115 Inspiring Innovation/tutorialrank.com
 CIS 115 Inspiring Innovation/tutorialrank.com CIS 115 Inspiring Innovation/tutorialrank.com
CIS 115 Inspiring Innovation/tutorialrank.com
 
A company's production process
A company's production processA company's production process
A company's production process
 
Which of the following is an input to the master production schedule (mps)
Which of the following is an input to the master production schedule (mps)Which of the following is an input to the master production schedule (mps)
Which of the following is an input to the master production schedule (mps)
 
A company's production process has an 80 percent learning curve rate
A company's production process has an 80 percent learning curve rateA company's production process has an 80 percent learning curve rate
A company's production process has an 80 percent learning curve rate
 
A company's production process has an 80 percent learning curve rate
A company's production process has an 80 percent learning curve rateA company's production process has an 80 percent learning curve rate
A company's production process has an 80 percent learning curve rate
 
Smu mba sem 3 om fall 2015 assignments
Smu mba sem 3 om fall 2015 assignmentsSmu mba sem 3 om fall 2015 assignments
Smu mba sem 3 om fall 2015 assignments
 
A p chart to monitor process quality
A p chart to monitor process qualityA p chart to monitor process quality
A p chart to monitor process quality
 
What is transaction processing
What is transaction processingWhat is transaction processing
What is transaction processing
 
Which of the following is a focusing step
Which of the following is a focusing stepWhich of the following is a focusing step
Which of the following is a focusing step
 

Más de vanesaburnand

InstructionsYou are to create YOUR OWN example of each of t.docx
InstructionsYou are to create YOUR OWN example of each of t.docxInstructionsYou are to create YOUR OWN example of each of t.docx
InstructionsYou are to create YOUR OWN example of each of t.docxvanesaburnand
 
InstructionsYou are a research group from BSocialMarketing, LLC.docx
InstructionsYou are a research group from BSocialMarketing, LLC.docxInstructionsYou are a research group from BSocialMarketing, LLC.docx
InstructionsYou are a research group from BSocialMarketing, LLC.docxvanesaburnand
 
InstructionsYou are attending an international journalist event.docx
InstructionsYou are attending an international journalist event.docxInstructionsYou are attending an international journalist event.docx
InstructionsYou are attending an international journalist event.docxvanesaburnand
 
InstructionsWrite the Organizational section of your project pap.docx
InstructionsWrite the Organizational section of your project pap.docxInstructionsWrite the Organizational section of your project pap.docx
InstructionsWrite the Organizational section of your project pap.docxvanesaburnand
 
InstructionsWrite a two-page (double spaced, Times New Roman S.docx
InstructionsWrite a two-page (double spaced, Times New Roman S.docxInstructionsWrite a two-page (double spaced, Times New Roman S.docx
InstructionsWrite a two-page (double spaced, Times New Roman S.docxvanesaburnand
 
InstructionsWrite a thesis statement in response to the topi.docx
InstructionsWrite a thesis statement in response to the topi.docxInstructionsWrite a thesis statement in response to the topi.docx
InstructionsWrite a thesis statement in response to the topi.docxvanesaburnand
 
InstructionsWhat You will choose a current issue of social.docx
InstructionsWhat You will choose a current issue of social.docxInstructionsWhat You will choose a current issue of social.docx
InstructionsWhat You will choose a current issue of social.docxvanesaburnand
 
InstructionsWrite a paper about the International Monetary Syste.docx
InstructionsWrite a paper about the International Monetary Syste.docxInstructionsWrite a paper about the International Monetary Syste.docx
InstructionsWrite a paper about the International Monetary Syste.docxvanesaburnand
 
InstructionsWrite a comprehensive medical report on a disease we.docx
InstructionsWrite a comprehensive medical report on a disease we.docxInstructionsWrite a comprehensive medical report on a disease we.docx
InstructionsWrite a comprehensive medical report on a disease we.docxvanesaburnand
 
InstructionsWhether you believe” in evolution or not, why is it.docx
InstructionsWhether you believe” in evolution or not, why is it.docxInstructionsWhether you believe” in evolution or not, why is it.docx
InstructionsWhether you believe” in evolution or not, why is it.docxvanesaburnand
 
InstructionsWe have been looking at different psychological .docx
InstructionsWe have been looking at different psychological .docxInstructionsWe have been looking at different psychological .docx
InstructionsWe have been looking at different psychological .docxvanesaburnand
 
InstructionsTITLEF14-2Beginning an 8-column work sheet for a merch.docx
InstructionsTITLEF14-2Beginning an 8-column work sheet for a merch.docxInstructionsTITLEF14-2Beginning an 8-column work sheet for a merch.docx
InstructionsTITLEF14-2Beginning an 8-column work sheet for a merch.docxvanesaburnand
 
InstructionsThis written assignment requires the student to inve.docx
InstructionsThis written assignment requires the student to inve.docxInstructionsThis written assignment requires the student to inve.docx
InstructionsThis written assignment requires the student to inve.docxvanesaburnand
 
InstructionsThe Art Form Most Meaningful to MePick the form .docx
InstructionsThe Art Form Most Meaningful to MePick the form .docxInstructionsThe Art Form Most Meaningful to MePick the form .docx
InstructionsThe Art Form Most Meaningful to MePick the form .docxvanesaburnand
 
InstructionsThink of a specific topic and two specific kin.docx
InstructionsThink of a specific topic and two specific kin.docxInstructionsThink of a specific topic and two specific kin.docx
InstructionsThink of a specific topic and two specific kin.docxvanesaburnand
 
InstructionsThere are different approaches to gathering risk da.docx
InstructionsThere are different approaches to gathering risk da.docxInstructionsThere are different approaches to gathering risk da.docx
InstructionsThere are different approaches to gathering risk da.docxvanesaburnand
 
InstructionsThe  Public Archaeology Presentation invites you.docx
InstructionsThe  Public Archaeology Presentation invites you.docxInstructionsThe  Public Archaeology Presentation invites you.docx
InstructionsThe  Public Archaeology Presentation invites you.docxvanesaburnand
 
InstructionsThe tools of formal analysis are the starting point .docx
InstructionsThe tools of formal analysis are the starting point .docxInstructionsThe tools of formal analysis are the starting point .docx
InstructionsThe tools of formal analysis are the starting point .docxvanesaburnand
 
InstructionsThe Homeland Security (DHS) agency is intended t.docx
InstructionsThe Homeland Security (DHS) agency is intended t.docxInstructionsThe Homeland Security (DHS) agency is intended t.docx
InstructionsThe Homeland Security (DHS) agency is intended t.docxvanesaburnand
 
InstructionsThe student should describe how learning abou.docx
InstructionsThe student should describe how learning abou.docxInstructionsThe student should describe how learning abou.docx
InstructionsThe student should describe how learning abou.docxvanesaburnand
 

Más de vanesaburnand (20)

InstructionsYou are to create YOUR OWN example of each of t.docx
InstructionsYou are to create YOUR OWN example of each of t.docxInstructionsYou are to create YOUR OWN example of each of t.docx
InstructionsYou are to create YOUR OWN example of each of t.docx
 
InstructionsYou are a research group from BSocialMarketing, LLC.docx
InstructionsYou are a research group from BSocialMarketing, LLC.docxInstructionsYou are a research group from BSocialMarketing, LLC.docx
InstructionsYou are a research group from BSocialMarketing, LLC.docx
 
InstructionsYou are attending an international journalist event.docx
InstructionsYou are attending an international journalist event.docxInstructionsYou are attending an international journalist event.docx
InstructionsYou are attending an international journalist event.docx
 
InstructionsWrite the Organizational section of your project pap.docx
InstructionsWrite the Organizational section of your project pap.docxInstructionsWrite the Organizational section of your project pap.docx
InstructionsWrite the Organizational section of your project pap.docx
 
InstructionsWrite a two-page (double spaced, Times New Roman S.docx
InstructionsWrite a two-page (double spaced, Times New Roman S.docxInstructionsWrite a two-page (double spaced, Times New Roman S.docx
InstructionsWrite a two-page (double spaced, Times New Roman S.docx
 
InstructionsWrite a thesis statement in response to the topi.docx
InstructionsWrite a thesis statement in response to the topi.docxInstructionsWrite a thesis statement in response to the topi.docx
InstructionsWrite a thesis statement in response to the topi.docx
 
InstructionsWhat You will choose a current issue of social.docx
InstructionsWhat You will choose a current issue of social.docxInstructionsWhat You will choose a current issue of social.docx
InstructionsWhat You will choose a current issue of social.docx
 
InstructionsWrite a paper about the International Monetary Syste.docx
InstructionsWrite a paper about the International Monetary Syste.docxInstructionsWrite a paper about the International Monetary Syste.docx
InstructionsWrite a paper about the International Monetary Syste.docx
 
InstructionsWrite a comprehensive medical report on a disease we.docx
InstructionsWrite a comprehensive medical report on a disease we.docxInstructionsWrite a comprehensive medical report on a disease we.docx
InstructionsWrite a comprehensive medical report on a disease we.docx
 
InstructionsWhether you believe” in evolution or not, why is it.docx
InstructionsWhether you believe” in evolution or not, why is it.docxInstructionsWhether you believe” in evolution or not, why is it.docx
InstructionsWhether you believe” in evolution or not, why is it.docx
 
InstructionsWe have been looking at different psychological .docx
InstructionsWe have been looking at different psychological .docxInstructionsWe have been looking at different psychological .docx
InstructionsWe have been looking at different psychological .docx
 
InstructionsTITLEF14-2Beginning an 8-column work sheet for a merch.docx
InstructionsTITLEF14-2Beginning an 8-column work sheet for a merch.docxInstructionsTITLEF14-2Beginning an 8-column work sheet for a merch.docx
InstructionsTITLEF14-2Beginning an 8-column work sheet for a merch.docx
 
InstructionsThis written assignment requires the student to inve.docx
InstructionsThis written assignment requires the student to inve.docxInstructionsThis written assignment requires the student to inve.docx
InstructionsThis written assignment requires the student to inve.docx
 
InstructionsThe Art Form Most Meaningful to MePick the form .docx
InstructionsThe Art Form Most Meaningful to MePick the form .docxInstructionsThe Art Form Most Meaningful to MePick the form .docx
InstructionsThe Art Form Most Meaningful to MePick the form .docx
 
InstructionsThink of a specific topic and two specific kin.docx
InstructionsThink of a specific topic and two specific kin.docxInstructionsThink of a specific topic and two specific kin.docx
InstructionsThink of a specific topic and two specific kin.docx
 
InstructionsThere are different approaches to gathering risk da.docx
InstructionsThere are different approaches to gathering risk da.docxInstructionsThere are different approaches to gathering risk da.docx
InstructionsThere are different approaches to gathering risk da.docx
 
InstructionsThe  Public Archaeology Presentation invites you.docx
InstructionsThe  Public Archaeology Presentation invites you.docxInstructionsThe  Public Archaeology Presentation invites you.docx
InstructionsThe  Public Archaeology Presentation invites you.docx
 
InstructionsThe tools of formal analysis are the starting point .docx
InstructionsThe tools of formal analysis are the starting point .docxInstructionsThe tools of formal analysis are the starting point .docx
InstructionsThe tools of formal analysis are the starting point .docx
 
InstructionsThe Homeland Security (DHS) agency is intended t.docx
InstructionsThe Homeland Security (DHS) agency is intended t.docxInstructionsThe Homeland Security (DHS) agency is intended t.docx
InstructionsThe Homeland Security (DHS) agency is intended t.docx
 
InstructionsThe student should describe how learning abou.docx
InstructionsThe student should describe how learning abou.docxInstructionsThe student should describe how learning abou.docx
InstructionsThe student should describe how learning abou.docx
 

Último

Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...ZurliaSoop
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxRamakrishna Reddy Bijjam
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptxMaritesTamaniVerdade
 
Vishram Singh - Textbook of Anatomy Upper Limb and Thorax.. Volume 1 (1).pdf
Vishram Singh - Textbook of Anatomy  Upper Limb and Thorax.. Volume 1 (1).pdfVishram Singh - Textbook of Anatomy  Upper Limb and Thorax.. Volume 1 (1).pdf
Vishram Singh - Textbook of Anatomy Upper Limb and Thorax.. Volume 1 (1).pdfssuserdda66b
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentationcamerronhm
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseAnaAcapella
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxVishalSingh1417
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibitjbellavia9
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17Celine George
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsMebane Rash
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.MaryamAhmad92
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxVishalSingh1417
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...Poonam Aher Patil
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxVishalSingh1417
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsKarakKing
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfNirmal Dwivedi
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - Englishneillewis46
 

Último (20)

Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
 
Vishram Singh - Textbook of Anatomy Upper Limb and Thorax.. Volume 1 (1).pdf
Vishram Singh - Textbook of Anatomy  Upper Limb and Thorax.. Volume 1 (1).pdfVishram Singh - Textbook of Anatomy  Upper Limb and Thorax.. Volume 1 (1).pdf
Vishram Singh - Textbook of Anatomy Upper Limb and Thorax.. Volume 1 (1).pdf
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptx
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 

CREATE TABLE OFFICES ( OFFICEID INT, CITY .docx

  • 1. CREATE TABLE OFFICES ( OFFICEID INT, CITY VARCHAR(20), REGION VARCHAR(12), MGRIDINT, TARGET DECIMAL (9,2), SALES DECIMAL (9,2), CONSTRAINT DEPTNO_PK PRIMARY KEY (OFFICEID) ); CREATE TABLE SALESREPS ( REPID INT, NAME VARCHAR(25), HIREDATE DATE, QUOTA DECIMAL (9,2), SALES DECIMAL (9,2), OFFICEID INT NOT NULL,
  • 2. CONSTRAINT REP_OFFICE_FK FOREIGN KEY (OFFICEID) REFERENCES OFFICES (OFFICEID), CONSTRAINT EMP_PRIMARY_KEY PRIMARY KEY (REPID)); CREATE TABLE CUSTOMERS ( CUSTID INT, COMPANY VARCHAR(25), PHONE VARCHAR(10), CREDITLIMIT DECIMAL(7,2), CUSTREPID INT NOT NULL, CONSTRAINT CUST_REPID_FK FOREIGN KEY (CUSTREPID) REFERENCES SALESREPS (REPID), CONSTRAINT CUSTOMER_PRIMARY_KEY PRIMARY KEY (CUSTID));
  • 3. CREATE TABLE PRODUCTS ( PRODUCTID VARCHAR(5), DESCRIPTION VARCHAR(25), PRODUCTPRICE decimal(8,2), QUANTITY_ON_HAND INT, CONSTRAINT PRODUCT_PK PRIMARY KEY(PRODUCTID)); CREATE TABLE ORDERS ( ORDID INT, CUSTID INT NOT NULL, ORDERDATE DATE, PRODUCTID VARCHAR(5), REPID INT, QTY INT, TOTALAMT DECIMAL (9,2), CONSTRAINT ORDERS_CUSTID_FK FOREIGN KEY (CUSTID) REFERENCES CUSTOMERS (CUSTID), CONSTRAINT ORDERS_PRODUCTID_FK FOREIGN KEY (PRODUCTID) REFERENCES PRODUCTS (PRODUCTID),
  • 4. CONSTRAINT ORDERS_REPID_FK FOREIGN KEY (REPID) REFERENCES SALESREPS (REPID), CONSTRAINT ORDERS_PK PRIMARY KEY (ORDID)); INSERT INTO OFFICES VALUES (22,'Denver','Western',6,300000,186042), (11,'New York','Eastern',9,575000,692637), (12,'Chicago','Eastern',NULL,800000,735042), (13,'Atlanta','Eastern',1,350000,367911), (14,'Los Angeles','Western',5,600000,550000); INSERT INTO SALESREPS VALUES (1,'Bill Adams','2008-10-11',350000,367911,13), (2,'Mary Jones','2013-01-04',200000,234877,13), (3,'Sue Smith','2009-06-15',250000,145000,12),
  • 5. (4,'Sam Clark','2011-08-23',250000,287000,14), (5,'Bob Randolf','2013-03-12',180000,100000,14), (6,'Dan Roberts','2013-03-12',180000,157987,22), (7,'Tom Synder','2012-03-30',200000,211000,22), (8,'Larry Fitch','2012-05-20',240000,340897,13), (9,'Paul Cruz','2011-10-19',340000,600000,11), (10,'Nancy Angelli','2005-02-05',400000,800023,11); Insert into CUSTOMERS values (2111,'JCP Inc','4569483748',50000,8), (2102,'First Corp','9148425732',65000,8), (2103,'Division Mfg.','8374475757',50000,5), (2123,'Carter and Sons','8373466321',40000,7),
  • 6. (2107,'Ace International','3113467785',35000,2), (2115,'Smithson Corp.','2016478446',20000,3), (2101,'Jones Mfg.','3114467257',65000,1), (2112,'Zetacorp','3483746293',50000,1), (2121,'QMA Assoc.','2017831028',45000,5), (2114,'Orion Corp.','2013482730',20000,5), (2124,'Peter Brothers','3104758374',40000,2), (2108,'Holm & Landis','3108946655',55000,2), (2117,'J.P. Sinclair','3486769013',35000,1), (2122,'Three-Way Lines','4059898888',30000,10), (2120,'Rico Enterprises','7874568930',50000,10), (2106,'Fred Lewis Corp.','8183847777',650000,6), (2119,'Solomon Inc.','8189993847',250000,6), (2118,'Midwest Systems','3279121212',600000,4), (2113,'Ian & Schmidt','2839488877',250000,4), (2105,'AAA Investments','2018373444',45000,7), (2110,'Top of the Line','3458837465',30000,9), (2126,'Holders Inc.','5607822121',25000,9);
  • 7. insert into PRODUCTS values ('2A45C','Deluxe Driller',1290.99,12), ('4100Y','Welder',2343.99,24), ('XK47','Reducer',1854.00,100), ('41672','Ionizer',1456.45,34), ('779C','Standard Driller',900.00,10), ('41003','Fabricator',3156.00,5), ('41004','Granite Saw ',345.00,54), ('112','Dumper',1567.00,21), ('2A447','Size 2 Pumper',2399.50,10), ('114','Size 1 Pump',1500.00,20), ('2A44R','Recycler',3589.29,15), ('41002','Bender',5634.99,4), ('4100Z','Compressor',1239.20,10), ('773C','Air Filtering Machine',1111.50,4), ('775C','Suction Adaptor',213.00,25),
  • 8. ('2A44L','Generator I', 5600.00,10); insert into ORDERS values (112961,2117,'2017-01-02','2A44L',2,6,33600), (113012,2111,'2017-01-03','41003',2,2,6312), (112989,2101,'2017-01-03','114',1,1,1567.00), (113051,2118,'2017-01-04','XK47',2,4,7416.00), (112968,2102,'2017-01-04','41004',4,10,3450.00 ), (113036,2107,'2017-01-05','4100Z',6,2,2478.40), (113045,2112,'2017-01-05','2A44R',1,1,3589.29), (112963,2103,'2017-01-05','41004',5,10,3450.00), (113013,2118,'2017-01-06','41003',5,1,3156.00), (113058,2108,'2017-01-06','112',4,1,1567.00), (112997,2124,'2017-02-02','41003',6,2,6312.00), (112983,2103,'2017-02-02','41004',2,6,1280.00), (113024,2114,'2017-02-02','XK47',1,6,11124.00),
  • 9. (113062,2124,'2017-02-06','114',5,2,3000.00), (112979,2114,'2017-02-12','4100Z',5,11,13631.20), (113027,2103,'2017-02-12','41002',6,1,5634.99), (113007,2112,'2017-02-15','773C',2,3,33345.50), (113069,2109,'2017-02-15','775C',7,22,4686.00), (113034,2107,'2017-02-16','2A45C',7,2,2581.98), (112992,2118,'2017-03-01','41002',8,1,5634.99), (112975,2111,'2017-03-01','2A44L',6,6,2260.90), (113055,2108,'2017-03-02','4100X',1,2,11200.00), (113048,2120,'2017-03-02','779C',5,4,2700.00), (112993,2106,'2017-03-02','2A45C',5,10,12999.99), (113065,2106,'2017-03-03','XK47',6,3,5562.00), (113003,2108,'2017-03-03','779C',3,3,2700.90), (113049,2118,'2017-03-15','XK47',3,15,27810.00), (112987,2103,'2017-03-16','4100Y',4,1,2343.99), (113057,2111,'2017-03-16','4100Z',4,1,1239.20), (113042,2111,'2017-03-16','2A44R',1,2,7178.58);
  • 10. Unit 2 Fleet Safety Journal entry: What are your thoughts on analyzing costs that affect a fleet's safety culture? Write about the pros and cons of performing a cost-benefit analysis within an organization. Your journal entry must be at least 200 words. No references or citations are necessary. Question 1 Identify which of the answers below is used by a company's management team in determining the non-labor costs per mile as applied to a fleet vehicle. Repair wages Fuel taxes Supervision Driver history
  • 11. Question 2 What are recognized as the three main types of driver distractions? Cognitive, visual, and manual Manual, visual, and speed Operation, equipment failures, and visual Passenger interaction, eating, and manual Question 3 Which of the following is NOT utilized in determining the time when it is more cost effective to replace a fleet vehicle than to continue to maintain it? Maintenance data Cost from fuel, oil, lube, and filter Mileage logs Driver history Question 4 Which of the following is NOT a stage in the construction of
  • 12. the safety, health, and environmental economic analysis model? Analysis of definitions and boundary Inventory analysis and impact assessment Postimplementation look-back Outline development Question 5 In conducting the impact assessment on a company's economic analysis of the fleet, which of the following chief factors should NOT be included in the assessment? Human operational capability Financial funding capability Support personnel Available technology Question 6 Describe how the Safety Measurement System (SMS) assists companies with identifying the seven most important safety issues that drivers face and determining which solutions are
  • 13. applicable to improve driver performance. Your response should be at least 75 words in length. Question 7 Explain how reactive strategies can negatively impact safety measures and training within an organization that controls fleet operations. How can proactive determinations help mitigate future on-the-job accidents and reduce the overall impact of the cost to the company from safety issues? Your response should be at least 75 words in length. Question 8 There are multiple direct and indirect costs to employers who manage fleets when on-the-job accidents happen with employees. Calculate the total cost to an employer whose driver was involved in an accident with $8,459 of direct costs. Provide examples of indirect costs used in your calculation. Show your calculations. Your response should be at least 75 words in length. Question 9 Describe how companies can utilize a cost-benefit analysis to effectively budget for future safety training within the organization. Your response should be at least 75 words in length.
  • 14. CIS336: Lab 6: Group Functions and Subqueries LAB OVERVIEW Scenario and Summary Lab 6 will introduce the concept of group functions and subqueries to meet more complex report requirements. This lab may be completed using either DeVry’s Omnymbus EDUPE- APP lab environment, or a local copy of the MySQL database running on your own computer using the ACME database tables. The lab will utilize a set of tables that are created and populated by the script file (create_ACME_db.sql). A few IMPORTANT things to note if using EDUPE MySQL: **There can be NO SPACES in alias names given to a column. For example: Select unit_price as “Retail Price “ from items; --this does NOT work in EDUPE MySQL. Any of the following WILL WORK: Select unit_price as "RetailPrice" from items; Select unit_price as "Retail_Price" from items; Select unit_price as Retail_Price from items; Select unit_price as RetailPrice from items; **Any calculated fields MUST be given an alias (and note above NO SPACES in alias). For example: select unit_price * 2 from items; --this does NOT work in EDUPE MySQL This will work: select unit_price * 2 as NewPrice from items; Deliverables · Lab Report (Answer Sheet) containing both the student- created SQL command(s) for each exercise, and the output showing the results obtained. Be sure your LAST NAME is on the file. LAB STEPS: Complete each of the exercises below.
  • 15. 1. Write a query to determine the total number of orders for each customer. Display the order id and display the total with a heading of TotalOrders (note no spaces). 2. Write a query to determine the number of customers for each sales rep. Display the sales rep ID and display the total with a heading of TotalCustomers. Sort the display by sales rep ID. 3. Write a query to determine the total number of sales reps in offices 22 and the total number of sales reps in office 13. Display the office Id and display the total number of reps with a heading of Total_Reps. 4. Write a query to determine the total number of customers for these sales reps: Sales rep 5, 1, and 8. Display the sales rep Id and display the total number of customers with a heading of Total_Customers. 5. Write a query to determine the total number of customers for each of the Sales Reps. But only display the sales reps and their number of customers if that total number of customers is greater than 2. Display the total with a heading of Total_Customers. 6. Write a query to determine the total number of customers for each of the Sales Reps that have a creditlimit that is greater than 40,000. But only display the sales reps and their number of customers if that total number of customers is greater than 1. Display the total number of customers with a heading of Total_Customers. 7. Write a query to determine the total dollar amount of all purchases for each customer. Display the customer Id and the total dollar amount of all purchases for each customer. Sort by
  • 16. customer id. 8. Write a query to determine the total dollar amount of all purchases for ONLY customers 2114, 2103, and 2108. Give the total purchase amount a heading of TotalSalesAmount. Display the customer Id and the total dollar amount of purchases for each customer id . Sort by the total sales. 9. Write a query to determine the total dollar amount of all purchases for all customers. But instead of displaying the custid, display the customer company name (You need a join). Give the total purchase amount a heading of TotalSalesAmount. Display the customer company name and the total dollar amount of purchases for each company. 10. Re-do the previous problem but only display those company names that have a total purchase amount that is greater than $20000. Only display the company names. 11. Display the average purchase order amount for the customers. Round the amount to two decimals. 12. Display the number of products ACME sells and what the average price is for their products. 13. Write a query to display the description of a product and the number of orders for that product. Sort the display by the description. 14. Redo the previous problem but this time just display those
  • 17. product names and the number of sales that have more than 3 sales. 15. Use a SubQuery to determine which sales reps have a sale that is greater than the average sale. Display the sales rep ID. Only show the sales rep ID once. 16. Use a SubQuery to display the city of all offices whose sales are below the average target for all the offices. 17. Use a SubQuery to list all sales rep IDs that have an average sales dollar amount greater the average sales dollar amount of the sales reps. You can use a correlated sub query or an correlated subquery. You need a correlated sub query if you wish to compare the average sales dollar amount to the average sales dollar amount to all the other sales reps NOT including the the sales rep you are comparing to. This is the end of Lab 6. CIS336 Lab 6 InstructionsPage 2 CIS336: Lab 6 Answer Sheet Your name ______________________ Just copy and paste a few rows if the output is very long. Solution 1: ~Paste your solution query here~
  • 18. ~Paste your solution query results text here~