Access 2002 query/reporting question

G

Guest

I need some assistance to help me create a report that will allow me to
report on the top 100 sales agents for my company.

The query I created does a sum on the total sales per agent, but now I need
to limit that query to only the top 100 agents based on that query's summed
value on the sales total by agent.

I'm fairly new to Access and am struggling to figure out a solution to limit
it at the top 100.

Any suggestions would be greatly appreciated.

Thanks in advance!
 
M

MGFoster

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

SELECT TOP 100, agentID, SUM(sales) As TotalSales
FROM ...
GROUP BY agentID
ORDER BY 2 DESC

The ORDER BY 2 DESC will sort the TotalSales column, highest value
first. Ties in the TotalSales amount will result in all ties being
selected. IOW, there might be more than 100 rows returned.

--
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)

-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBQjgADYechKqOuFEgEQIVxQCcDYpjVQmU71iTdb6DpoPYEymK+uUAoJht
VufumUfPSY8459kT41VFqYof
=myH5
-----END PGP SIGNATURE-----
 

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