Queries by Company Name, Slsp & Revenue

G

Guest

I am trying to run a query on a table of 66K + records. I
am trying to get a total company revenue for over 3000
different companies. I've got them all listed by
alphabetical order and each record contains company name
and revenue. My problem is to find the sum of each
individual company without having to type in all the
company names into crieria. I'm also trying to do this
with Salesperson and Office. My goal is to find our top 15
accounts, best salesperson, and best office based on
revenue. please help!!
 
T

Tom Ellison

Dear anonymous:

You should use a "Totals Query" for this, something like:

SELECT CompanyName, SUM(Revenue) AS TotalRevenue
FROM YourTable
GROUP BY CompanyName

You would need to change the above to reflect the actual column and
table names in your database.

It will show each CompanyName only once in the results, and add
together the values in the Revenue column for each separate value of
CompanyName.

Tom Ellison
Microsoft Access MVP
Ellison Enterprises - Your One Stop IT Experts
 

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