Question
Write a Oracle SQL script that does the following. From the tool libary in the jdoe22 schema, select three values. The three values are (a)
Write a Oracle SQL script that does the following. From the tool libary in the jdoe22 schema, select three values. The three values are (a) the number of tools that are out on loan and overdue, (b) the number of tools that are out on loan and due today, and (c) the number of tools that are out on loan and are not overdue. From these three values, select the greatest value a print out one of three messages: (a) 'Currently, there are xx tools out on loan that are overdue. Of all the tools out on loan, this is most of them.', (b) 'Currently, there are xx tools out on loan that are due back in today. Of all the tools out on loan, this is most of them.', or (c) 'Currently, there are xx tools out on loan that are not due back in until after today. Of all the tools out on loan, this is most of them.'
NULLABLE DATA DEFAULTCOLUMN ID No No No No Yes COLUMN NAME COMMENTS DATA TYPE NUMBER (8,0) NUMBER (8, 0) NUMBER (8,0) NUMBER (8, 0) NUMBER (8,0) 1 LOAN ID 2 TOOL NO 3 TOOL_DESC ID 4 EMPLOYEE ID 5 JOB_ID 6 TOOL OUT DATE 7 DUE_DATE 8 LOAN ACTIVE 9 LOANSTATUS_CHANGE DATE DATE 10 CHANGED BY USER 11 DATE_UPDATED (null) (null) (null) (null) (null) (null) (null) (null) (null) user sysdate 1 (null) 2 (null) 3 (null) 4 (null) 5 (null) 6 (null) 7 (null) 8 (null) 9 (null) 10 (null) l1 (null) Yes VARCHAR2 (8 BYTE) No No VARCHAR2 (20 BYTE) Yes Yes NULLABLE DATA DEFAULTCOLUMN ID No No No No Yes COLUMN NAME COMMENTS DATA TYPE NUMBER (8,0) NUMBER (8, 0) NUMBER (8,0) NUMBER (8, 0) NUMBER (8,0) 1 LOAN ID 2 TOOL NO 3 TOOL_DESC ID 4 EMPLOYEE ID 5 JOB_ID 6 TOOL OUT DATE 7 DUE_DATE 8 LOAN ACTIVE 9 LOANSTATUS_CHANGE DATE DATE 10 CHANGED BY USER 11 DATE_UPDATED (null) (null) (null) (null) (null) (null) (null) (null) (null) user sysdate 1 (null) 2 (null) 3 (null) 4 (null) 5 (null) 6 (null) 7 (null) 8 (null) 9 (null) 10 (null) l1 (null) Yes VARCHAR2 (8 BYTE) No No VARCHAR2 (20 BYTE) Yes YesStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started