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,...

  • How to write the insert, search, and remove functions for this hash table program? I'm stuck......

    How to write the insert, search, and remove functions for this hash table program? I'm stuck... This program is written in C++ Hash Tables Hash Table Header File Copy and paste the following code into a header file named HashTable.h Please do not alter this file in any way or you may not receive credit for this lab For this lab, you will implement each of the hash table functions whose prototypes are in HashTable.h. Write these functions in a...

  • General Journal, Trial Balance, Statement of SE, Balance Sheet. Prefer online answer rather than on paper...

    General Journal, Trial Balance, Statement of SE, Balance Sheet. Prefer online answer rather than on paper just so I can read the writing. Thank you!!! Tony and Suzie graduate from college in May 2021 and begin developing their new business. They begin by offering clinics for basic outdoor activities such as mountain biking or kayaking. Upon developing a customer base, they'll hold their first adventure races. These races will involve four-person teams that race from one checkpoint to the next...

  • 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...

  • Instructions: Review each case study and select the correct ICD-10-CM diagnostic code.no hand writing and answer...

    Instructions: Review each case study and select the correct ICD-10-CM diagnostic code.no hand writing and answer all the cases Case 1 Emergency Department Note This 9-year-old male patient was brought to the ER by his mother. His left external ear is warm to touch, and it appears red and swollen. He has had a fever of 100 for the past 2 days. Upon otoscopic exam, the middle and inner ear are reviewed with no findings. There is definitely cellulitis of...

  • how might i show a change from 60 days worth of inventory to 30 days worth...

    how might i show a change from 60 days worth of inventory to 30 days worth in this financial statement? The goal is to show how it affects the year end notes payable, but what numbers would i change? -2.0 Clipboard UPDATES AVAILABLE Updates for Office are ready to be installed, but first we need to does X f o C501047 048-049 B C D E LMNOPI Depreciation (4) 0.9 0.9 0.9 0.9 1.0 10.7 Interest Expense (5) 0.6 0.4...

  • SOLVE USING C!!! Project objective: Conditional statements, loops, reading from file, user defined functions. **Submit source...

    SOLVE USING C!!! Project objective: Conditional statements, loops, reading from file, user defined functions. **Submit source code (LargeProg1.c) through Canvas One source code file(unformatted text) will be submitted Here is INCOMPLETE code to get started: LargeProg1.c The file name must match the assignment The code should be tested and run on a Microsoft compiler before it is uploaded onto Canvas The code must be submitted on time in order to receive credit (11:59PM on the due date) Late submissions will...

  • (PICTURE IS OF JOURNAL ENTRY FROM PART 1 THAT MAY HAVE TO BE ENTERED TO THIS...

    (PICTURE IS OF JOURNAL ENTRY FROM PART 1 THAT MAY HAVE TO BE ENTERED TO THIS QUESTION AS WELL) This project is an extension of Part 1, so just like in the real world the previous transactions do not go away. Review your transaction analysis, journal entries, T-Account postings and Trial Balance for accuracy. You start from where that part ended and add this information. The following transactions are adjusting entries that need to be booked as of June 30,...

  • Today is Thursday , three days before your meeting begins. You are on-site in Rio de...

    Today is Thursday , three days before your meeting begins. You are on-site in Rio de Janeiro , and all is going well so far. Your destination management company (DMC) has been keeping track of the inevitable arrival changes. Your team is getting welcome packets together, incorporating last-minute changes into the day-by-day schedule, checking VIP amenities, and preparing for the next morning's arrival of your boss and several other senior managers. Good news! Your project coordinator has just verified that...

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
ADVERTISEMENT