Question

I'm really struggling with these homework questions it's mainly 1 and 2, so if you can't...

I'm really struggling with these homework questions it's mainly 1 and 2, so if you can't help with all then please just one and two I've spent hours on those two and can't seem to get past them. SQL

That being said, if you could help with these 5 I would very much appreciate it:

INVOICES(table)

Columns

INVOICE_ID
VENDOR_ID
INVOICE_NUMBER
INVOICE_DATE
INVOICE_TOTAL
PAYMENT_TOTAL
CREDIT_TOTAL
TERMS_ID
INVOICE_DUE_DATE
PAYMENT_DATE

VENDORS(table)

Columns

VENDOR_ID
VENDOR_NAME
VENDOR_ADDRESS1
VENDOR_ADDRESS2
VENDOR_CITY
VENDOR_STATE
VENDOR_ZIP_CODE
VENDOR_PHONE
DEFAULT_TERMS_ID
DEFAULT_ACCOUNT_NUMBER

GENERAL_LEDGER_ACCOUNTS(table)

Columns

ACCOUNT_NUMBER
ACCOUNT_DESCRIPTION

  1. Display the Vendor’s Name and their associated invoice Payment totals for all invoices with a dollar sign and 2 decimals for all invoices that have a payment total balance, listing the highest to lowest balance.
  1. Display the vendor’s name if they have paid at least one invoice within 30 days. Show the vendor name only once in alphabetical order.
  1. List all vendors name and the last day of the month for the associated invoice due dates. List the oldest date first.
  1. Display the first 10 characters for the account description in alphabetical order, if the description is shorter than 10 place the necessary number of $ at the end of the description
  1. Display all the account descriptions alphabetically which contain Taxes anywhere in the description.

Homework Answers

Answer #1

1. Display the Vendor’s Name and their associated invoice Payment totals for all invoices with a dollar sign and 2 decimals for all invoices that have a payment total balance, listing the highest to lowest balance.

SELECT V.VENDOR_NAME , "$" + CAST( ROUND(I.PAYMENT_TOTAL , 2) AS VARCHAR(15)) I.PAYMENT_TOTAL

FROM VENDORS V , INVOICES I

WHERE V.VENDOR_ID = I.VENDOR_ID

ORDERED BY I.PAYMENT_TOTAL DESC ;

2. Display the vendor’s name if they have paid at least one invoice within 30 days. Show the vendor name only once in alphabetical order.

SELECT V.VENDOR_NAME

FROM VENDORS V , INVOICES I

WHERE V.VENDOR_ID = V.VENDOR_ID AND DATEDIFF(day, INVOICE_DUE_DATE , PAYMENT_DATE) <= 30

ORDERED BY V.VENDOR_NAME;

Know the answer?
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
Similar Questions
Class-In Assignment 3: Chapters 4&5 How to retrieve data from two or more tables Exercises 1....
Class-In Assignment 3: Chapters 4&5 How to retrieve data from two or more tables Exercises 1. Write a SELECT statement that returns all columns from the Vendors table inner-joined with all columns from the Invoices table. 2. Write a SELECT statement that returns four columns: vendor_name vendor_name from the Vendors table invoice_number invoice_number from the Invoices table invoice_date invoice_date from the Invoices table balance_due invoice_total minus payment_total minus credit_total from the Invoices table The result set should have one row...
Question 1 of 15 Linsay’s Landscaping wants to make notes in QuickBooks each time she services...
Question 1 of 15 Linsay’s Landscaping wants to make notes in QuickBooks each time she services a client to streamline the invoicing process at the end of the month. She does not want these records to affect any month or year to date financial reports throughout the month until she invoices the client. Which of the following transaction types do you recommend she uses to achieve this goal? A. Invoice B. Credit Memo C. Sales Receipt D. Delayed Charge E....
Please read the article and answear about questions. Determining the Value of the Business After you...
Please read the article and answear about questions. Determining the Value of the Business After you have completed a thorough and exacting investigation, you need to analyze all the infor- mation you have gathered. This is the time to consult with your business, financial, and legal advis- ers to arrive at an estimate of the value of the business. Outside advisers are impartial and are more likely to see the bad things about the business than are you. You should...
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT