1.) Write a SELECT statement that returns three columns from two tables, all using column aliases:
Vendor - VendorName column
Date - InvoiceDate column
Number - InvoiceNumber column
Sort the final result by Vendor and Date
Hint: Use an INNER JOIN
2.) Write a SELECT statement that returns four columns:
VendorContact (column alias) - From the Vendor table - A concatenation of VendorContactFName and VendorContactLName with a space in between.
InvoiceNumber - From the Invoices table
InvoiceDate - From the Invoices table
Balance - InvoiceTotal minus PaymentTotal and CreditTotal
Sort the final result by Balance, descending. The result set should have a row for each invoice with a non-zero balance.
Hint: Use an INNER JOIN
Get Free Quote!
326 Experts Online