Not sure If I can post this here, but going to, so sorry if I am not in the right forum.
I have a problem with a query and would really appreciate some help.
I have to - Create a view named TOP10PaidInvoices that returns three columns for each vendor: VendorName, LastInvoice (the most recent invoice date), and SumOfInvoices (the sum of the InvoiceTotal column). Return only the 10 vendors with the largest SumOfInvoices and include only paid invoices.
Here is my statement and I am a little confused. Would like to know what is wrong with it if I may ask.
CREATE VIEW TOP10PaidInvoices
SELECT TOP 10 Vendors.VendorName, Invoices.LastInvoice AS InvoiceDate,
Invoices.SumOfInvoice AS InvoiceTotal,
FROM Invoices INNER JOIN Vendors ON Invoices.InvoiceID = Vendors.VendorID
ORDER BY SumOfInvoices ASC
Thank you in advance