Question: In SQL, 1. Create a view named OPEN_ITEMS, that shows the invoices that haven't been paid. This view should return four columns from the vendors

In SQL,

1. Create a view named OPEN_ITEMS, that shows the invoices that haven't been paid. This view should return four columns from the vendors and invoices table: vendor_name, invoice_number, invoice_total, and balance_due (invoice_total - payment_total - credit_total).

2. Write a SELECT statement that returns all the columns in the OPEN_ITEMS view that you created in exercise 1, with one row for each invoice that has a balance due of $1000 or more.

3. Create a view named OPEN_ITEMS_SUMMARY that returns ONE summary row for each vendor that has invoices that haven't been paid. Each row should include vendor_name, open_item_count (the number of invoices with a balance due), and open_item_total (the total of the balance due amounts).

4. Write a SELECT statement that returns just the 5 rows from the open_items_summary view that you created in exercise 3.

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!