I do an entry for each item purchased, and there are multiple items per
purchase order. I would like the query to total the dollars spent per
purchase order without all the line item details and without repeating the
vendor and PO numbers so that I don't have to do a separate table by PO and
total.
SELECT [PO Number], Sum([Total])
FROM YourTable
GROUP BY [PO Number]
ORDER BY [PO Number] ;
SELECT [Vendor Name], Sum([Total])
FROM YourTable
GROUP BY [Vendor Name]
ORDER BY [Vendor Name] ;
SELECT [Vendor Name], [PO Number], Sum([Total])
FROM YourTable
GROUP BY [Vendor Name], [PO Number]
ORDER BY [Vendor Name], [PO Number] ;
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.