4. Get a count of the records in InvoiceArchive, the column header should read Record Count. 5. Use the Vendors table, get the Vendor Name, Vendor Contact Last Name, and Vendor State. Sort the state in alphabetical order with the following column headers Vendor, Contact and State. 6. Create a query of your own that incorporates at least three concepts from the slides. 7. Get a list of where the account number is 553 and Invoice Line Item Description contains Address Correction. (Use table InvoiceLineItems) 8. SELECT Count(*) FROM Invoices where InvoiceDueDate between '01/31/2019' and '07/15/2020' 9. Get a list of unique Vendor IDs from the Invoices table.
1. To get the count of the records in InvoiceArchive, use the following SQL query:
SELECT COUNT(*) AS [Record Count] FROM InvoiceArchive;
This will return a single row with a single column named "Record Count" that contains the number of records in the InvoiceArchive table.
2. To get the Vendor Name, Vendor Contact Last Name, and Vendor State from the Vendors table, sorted by state in alphabetical order, use the following SQL query:
SELECT VendorName AS Vendor, VendorContactLastName AS Contact, VendorState AS State
FROM Vendors
ORDER BY VendorState;
This will return a table with three columns named "Vendor", "Contact", and "State", sorted by the "State" column in ascending order.
Trending now
This is a popular solution!
Step by step
Solved in 3 steps