Need Top percentage of records rather than Top Values

  • Thread starter Thread starter Kenny Markhardt
  • Start date Start date
K

Kenny Markhardt

Have many Forms/Reports where records are displayed/printed from queries
that select the 30 largest borrowers. Actually I want the largest borrowers
that make up about 30-40% of the portfolio depending on other circumstances.
So I have to keep adjusting the Top 30 query (shown below) until I get to
the proper amount.
Is it possible to do this with queries and/or tables?
Thanks in advance for any help. I've spent way too much time on something
that seems to me should be very easy to do.

SELECT DISTINCTROW TOP 30 Loans.BORROWER_ID,
Sum(Loans.BALANCE_OUTSTANDING) AS [Sum Of BALANCE_OUTSTANDING],
Count(*) AS [Count Of Loans]
FROM Loans
GROUP BY Loans.BORROWER_ID
ORDER BY Sum(Loans.BALANCE_OUTSTANDING) DESC;
 
Actually I want the largest borrowers
that make up about 30-40% of the portfolio depending on other circumstances.
So I have to keep adjusting the Top 30 query (shown below) until I get to
the proper amount.
Is it possible to do this with queries and/or tables?

Yep:

SELECT DISTINCTROW TOP 30 PERCENT


John W. Vinson[MVP]
Join the online Access Chats
Tuesday 11am EDT - Thursday 3:30pm EDT
http://community.compuserve.com/msdevapps
 
Back
Top