Question: Using SQL Server 2017 for the following questions: 1. Write a SELECT statement that returns the InvoiceNumber and balance due for every invoice with a

Using SQL Server 2017 for the following questions:

1. Write a SELECT statement that returns the InvoiceNumber and balance due for every invoice with a non-zero balance and an InvoiceDueDate thats less than 30 days from today.

2. Add a column to the query described in exercise 1 that uses the RANK() function to return a column named BalanceRank that ranks the balance due in descending order.

InvoiceTotal - PaymentTotal = Balance

Table Name : Invoices

Table Colums: InvoiceID, VendorID, InvoiceNumber, InvoiceDate, InvoiceTotal, CreditTotal, InvoiceDueDate,PaymentDate

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!