19 lines
No EOL
733 B
SQL
19 lines
No EOL
733 B
SQL
-- #### Start of class stuff ####
|
|
|
|
-- Get the InvoiceId, InvoiceTotal, and InvoiceDueDate for all invoices for vendor 110
|
|
SELECT InvoiceId, InvoiceTotal, InvoiceDueDate
|
|
FROM Invoices
|
|
WHERE VendorID = 110
|
|
|
|
-- Get the latest 10 invoices for vendor 123: InvoiceId, InvoiceDueDate, InvoiceTotal
|
|
SELECT TOP 10 InvoiceId, InvoiceTotal, InvoiceDueDate
|
|
FROM Invoices
|
|
WHERE VendorID = 123
|
|
ORDER BY InvoiceDueDate DESC
|
|
|
|
-- Get the InvoiceId, VendorId, InvoiceDueDate, and InvoiceTotal for all invoices due between 1/1/2020 and 1/31/2020
|
|
SELECT InvoiceId, VendorId, InvoiceDueDate, InvoiceTotal
|
|
FROM Invoices
|
|
WHERE InvoiceDueDate BETWEEN '1/1/2020' AND '1/31/2020'
|
|
|
|
-- ######################################################################## -- |