Access over 20 million homework & study documents

SQL Scripts to Create Production Table

Content type
User Generated
Type
Study Guide
Rating
Showing Page:
1/3
Task # 2 Has been Solved!!!!
SQL Scripts to Create Production Table:
CREATE Table Production
(
SerialNo varchar(20) NOT NULL,
BatchNo varchar(25),
ProductCode varchar(25),
MachineTime decimal(2,2),
AssemblyTime decimal(2,2),
FinishTime decimal(2,2),
Cost varchar(20)
);
SELECT
PRODUCTCODE, AVG(MACHINETIME) AS MACHINETIMEAverage,
AVG(ASSEMBLYTIME) AS ASSEMBLYTIMEAverage, AVG(FINISHTIME) AS
FINISHTIMEAverage ,to_char(AVG(to_NUMBER(SUBSTR(COST,2, LENGTH(COST)-1))),
'L000D000000') AS COSTAverage
FROM PRODUCTION
GROUP BY PRODUCTCODE;

Sign up to view the full document!

lock_open Sign Up
Showing Page:
2/3
SOLVE SQL PROBLEMS (TASK # 3 6)

Sign up to view the full document!

lock_open Sign Up
Showing Page:
3/3

Sign up to view the full document!

lock_open Sign Up
Unformatted Attachment Preview
Task # 2 – Has been Solved!!!! SQL Scripts to Create Production Table: CREATE Table Production ( SerialNo varchar(20) NOT NULL, BatchNo varchar(25), ProductCode varchar(25), MachineTime decimal(2,2), AssemblyTime decimal(2,2), FinishTime decimal(2,2), Cost varchar(20) ); SELECT PRODUCTCODE, AVG(MACHINETIME) AS MACHINETIMEAverage, AVG(ASSEMBLYTIME) AS ASSEMBLYTIMEAverage, AVG(FINISHTIME) AS FINISHTIMEAverage ,to_char(AVG(to_NUMBER(SUBSTR(COST,2, LENGTH(COST)-1))), 'L000D000000') AS COSTAverage FROM PRODUCTION GROUP BY PRODUCTCODE; SOLVE SQL PROBLEMS (TASK # 3 – 6) ...
Purchase document to see full attachment
User generated content is uploaded by users for the purposes of learning and should be used following Studypool's honor code & terms of service.

Anonymous
Nice! Really impressed with the quality.

Studypool
4.7
Trustpilot
4.5
Sitejabber
4.4