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;
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;