Question: Write an Oracle-compatible SQL script that declares a variable and then sets it equal to the sum of all the rows in the invoices table

Write an Oracle-compatible SQL script that declares a variable and then sets it equal to the sum of all the rows in the invoices table that have a balance due that is greater than or equal to a certain amount (you choose the amount). Then the script should display a message that states whether or not the sum of invoice totals exceeds $50,000.Write an Oracle-compatible SQL script that declares a variable and then sets

INVOICES Columns Data Constraints Grants Statistics Triggers Flashback IDependencies Details Partitions Indexes SQL /' GB) ? Actions.. DATA TYPE NUMBER NUMBER VARCHAR2(50 BYTE) No NULLABLE DATA DEFAULT E : COLUMN-ID ES COMMENTS No No COLUMN NAME 1 INVOICE ID 2 VENDOR ID 3 INVOICE_NUMBER 4 INVOICE DATE 5 INVOICE TOTAL NUMBER(9,2) 6 PAYMENT TOTAL NUMBER(9,2) 7 CREDIT TOTAL 8 TERMS ID 9 INVOICE DUE DATE DATE 10 PAYMENT DATE DATE 1 (null) 2 (null) 3 (null) 4 (null) 5 (null) 6 (null) 7 (null) 8 (null) 9 (null) 10 (null) (nul) (null) (nul) (null) (nul) No No Yes Yes No No Yes(null) DATE NUMBER(9,2) NUMBER (null) (null) INVOICES Columns Data Constraints Grants Statistics Triggers Flashback IDependencies Details Partitions Indexes SQL /' GB) ? Actions.. DATA TYPE NUMBER NUMBER VARCHAR2(50 BYTE) No NULLABLE DATA DEFAULT E : COLUMN-ID ES COMMENTS No No COLUMN NAME 1 INVOICE ID 2 VENDOR ID 3 INVOICE_NUMBER 4 INVOICE DATE 5 INVOICE TOTAL NUMBER(9,2) 6 PAYMENT TOTAL NUMBER(9,2) 7 CREDIT TOTAL 8 TERMS ID 9 INVOICE DUE DATE DATE 10 PAYMENT DATE DATE 1 (null) 2 (null) 3 (null) 4 (null) 5 (null) 6 (null) 7 (null) 8 (null) 9 (null) 10 (null) (nul) (null) (nul) (null) (nul) No No Yes Yes No No Yes(null) DATE NUMBER(9,2) NUMBER (null) (null)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!