Query to extract the last sale from a company by date

Joined
Jul 31, 2007
Messages
2
Reaction score
0
Hi All

I have a single table DB (extracted from an accounting system) and it has multiple fields, including company name, invoice total, date, job position, id, sales rep.

I need to come up with something to list the latest sale by company and the amount, the data starts from 1/07/2006 up to today and there can be up to 50 records for each company (when sorted). EG:

Company1, $130.00, 1/7/06
Company1, $140.00, 2/7/06
Company1, $130.00, 3/7/06
Company1, $160.00, 10/7/06
Company1, $130.00, 11/7/06

Company2, $130.00, 1/7/06
Company2, $150.00, 2/7/06
Company2, $130.00, 10/7/06
Company2, $180.00, 11/7/06

So I need to list the following from the above data:

Company1, $130.00, 11/7/06
Company2, $180.00, 11/7/06

Any help appreciated.
 

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.

Ask a Question

Top