Question

Modify the search expression for InvoiceDueDate from the previous solution. Rather than 30 days from today,...

Modify the search expression for InvoiceDueDate from the previous solution. Rather than 30 days from today, return invoices due before the last day of the current month.

This is what I have and I referred to it in the title as "Previous solution":

SELECT InvoiceNumber, (InvoiceTotal - PaymentTotal - CreditTotal) AS Balance, InvoiceDueDate
FROM Invoices
WHERE (InvoiceTotal - PaymentTotal - CreditTotal) > 0 and InvoiceDueDate < GETDATE() + 30;

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Please find my answer:

SELECT
InvoiceNumber,
(InvoiceTotal - PaymentTotal) as Balance
FROM Invoices
WHERE
InvoiceTotal - PaymentTotal > 0
AND
InvoiceDueDate BETWEEN DATEADD(DAY, -1, GETDATE()) AND GETDATE()

Please DONT forgot to rate my answer. We are working hard for you Guys!!

Add a comment
Know the answer?
Add Answer to:
Modify the search expression for InvoiceDueDate from the previous solution. Rather than 30 days from today,...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • IN C++ In a previous assignment you wrote pseudo code for the calculation of the days...

    IN C++ In a previous assignment you wrote pseudo code for the calculation of the days into a year given the date. Write a function that returns an int. It takes three parameters , all int(s), int DaysIntoYear ( int Year, int Month, int day); The return value is the number of days in the year from January 1 to the specified date.   Year is included so you can determine if this is a leap year ( see below).   If...

  • this needs to be in Java: use a comparator class which is passed into the sort...

    this needs to be in Java: use a comparator class which is passed into the sort method that is available on the ArrayList. import java.util.Scanner; public class Assign1{ public static void main(String[] args){ Scanner reader = new Scanner (System.in); MyDate todayDate = new MyDate(); int choice = 0; Library library = new Library(); while (choice != 6){ displayMainMenu(); if (reader.hasNextInt()){ choice = reader.nextInt(); switch(choice){ case 1: library.inputResource(reader, todayDate); break; case 2: System.out.println(library.resourcesOverDue(todayDate)); break; case 3: System.out.println(library.toString()); break; case 4: library.deleteResource(reader,...

  • Complete the Cash Collections Schedule: Provide the formula cell view rather than the numerical answer. Cash...

    Complete the Cash Collections Schedule: Provide the formula cell view rather than the numerical answer. Cash Collections Schedule January February March 60% of current months sale                 30% of previous months sale 10% of second previous months sale Total collections The Distribution Center of 123 Oil and Gas Company wants a master budget for the next three months, beginning January 1st. It desires an ending minimum cash balance of $4,000 each month. Sales are forecasted at an average selling price/transfer...

  • Problem 1. The account balances from the September 30, 2020 unadjusted trial balance for Washington Enterprises...

    Problem 1. The account balances from the September 30, 2020 unadjusted trial balance for Washington Enterprises Inc. are presented below: Debit Credit Contributed Capital.. $110,000 Office Furniture... 72,000 Accumulated Depreciation Furniture 6,000 Cash... $224,000 Rent Expense. 12,000 Retained Earnings.. 125,000 Accounts Receivable. 71,000 Accounts Payable.... 98,000 Office Supply Inventory.. 58,000 Note Payable (taken out on 9/1/20; 10% interest due annually) 30,000 Consulting Revenue... 110,000 Deferred Revenue.. 20,000 Salaries Expense. 40,000 Prepaid Insurance. 22,000 Additional information is as follows: a. The...

  • Modify the booklist program (from the lecture notes) by adding delet and insert operations into the...

    Modify the booklist program (from the lecture notes) by adding delet and insert operations into the BookList class. The insert method should be based on a compareTo() method in the Book class that determines if one book title comes before another alphabetically. The insert method will maintain the BookList in alphabetical order. Exercise various insertion and deletion operations, using the code below for your main program: //lib.cpp #include “pch.h” #include using namespace std; #include "BookList.h" int main(int argc, char* argv[])...

  • Henri Heinzl is preparing a bank reconciliation for his business, Heinzl Company Indicate whether each of the followin...

    Henri Heinzl is preparing a bank reconciliation for his business, Heinzl Company Indicate whether each of the following items would be added to the bank balance, deducted from the bank balance, added to the Cash account balance in the general ledger (G/L), or deducted from the Cash account balance in the G/L. If any item does not have to be included in the bank reconciliation, select the option "not included in the bank reconciliation. a. A deposit of $2,310 at...

  • The account balances from the September 30, 2020 unadjusted trial balance for Washington Enterprises Inc. are...

    The account balances from the September 30, 2020 unadjusted trial balance for Washington Enterprises Inc. are presented below: Debit Credit Contributed Capital.. $110,000 Office Furniture... 72,000 Accumulated Depreciation-Furniture.. 6,000 Cash... $224,000 Rent Expense. 12,000 Retained Earnings.. 125,000 Accounts Receivable.. 71,000 Accounts Payable.. 98,000 Office Supply Inventory. 58,000 Note Payable (taken out on 9/1/20; 10% interest due annually) 30,000 Consulting Revenue. 110,000 Deferred Revenue. 20,000 Salaries Expense.. 40,000 Prepaid Insurance. 22,000 Additional information is as follows: a. The Prepaid Insurance represents...

  • Problem: Complete the Purchase Budget (below) using Excel: Provide the formula cell view rather than the numerical answ...

    Problem: Complete the Purchase Budget (below) using Excel: Provide the formula cell view rather than the numerical answer. Purchase Budget December January February March Desired Ending Inventory Cost of Goods Sold Total Needed Beginning Inventory Purchases The Distribution Center of 123 Oil and Gas Company wants a master budget for the next three months, beginning January 1st. It desires an ending minimum cash balance of $4,000 each month. Sales are forecasted at an average selling price/transfer price of S4 per...

  • Photos Screerwhot (1png See all photos + Ad to O Search thare The following events occurred...

    Photos Screerwhot (1png See all photos + Ad to O Search thare The following events occurred for Favata Company a. Received $20.000 cash from owners and issued stock to them. b. Borrowed $17,000 cash from a bank and signed a note due later this year. c. Bought and received $1,800 of equipment on account. d. Purchased land for $32,000: paid $3,000 in cash and signed a long-term note for $29,000. e. Purchased $13,000 of equipment; paid $3,000 in cash and...

  • e) On November 30, Dizzy Controls Inc. borrowed $600,000 cash from its bank and signed a...

    e) On November 30, Dizzy Controls Inc. borrowed $600,000 cash from its bank and signed a two-year promissory note bearing 7.4% annual interest due on the last day of the month. DATE ACCOUNT NAMES DEBIT CREDIT On November 29, Dizzy Controls Inc. issued a check for $82,400 to its accountant, Cooper Lybrand, for accounting services used to setup the company. DATE ACCOUNT NAMES DEBIT CREDIT On December 1, Dizzy Controls Inc. signed a two-year contract with Deluca Fix-it Corp. for...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT