Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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.image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Systems Design Implementation And Management

Authors: Peter Rob, Carlos Coronel

6th International Edition

061921323X, 978-0619213237

More Books

Students also viewed these Databases questions