Question: A 1 ) Write a script that uses one variable to store the count of all of the invoices in the Invoices table that have

A1) Write a script that uses one variable to store the count of all of the invoices in the Invoices table that have a balance due and another variable to store the sum of the balances due for all of those invoices. If that total balance due is greater than or equal to $30,000, the script should display a result set that displays the values of both variables like this:
Invoice count: 11
Total due: 32020
A2) Write a script that generates the same result set as the previous exercise, but uses a view instead of a temporary table. Make sure the script drops the view if it already exists, so you can run it twice without getting an error.
SQL

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 Programming Questions!