Problem with percentages

  • Thread starter Thread starter Golfinray
  • Start date Start date
G

Golfinray

I have a table and query for an index. The index runs from .0000 to .995.
There can be many different numbers of decimal places, like .333560000 or
just .4.
The are 250 numbers in the index and school districts are given an index
rating. I need to find the 25% of school districts with the lowest rating.
Then I need to find the 75% with the highest rating so I can do some
calculations. Thanks so much for the help!!! You guys are great!
 
I need to find the 25% of school districts with the lowest rating.
Dividing 250 records by 4 = 62.5 or 250 time 0.25 equals 62.5 also.
Sort on rating and set SELECT TOP 63.

Subtracting 63 from 250 equals 187. Sort descinding on rating and set
SELECT TOP 187.
 
SELECT TOP 25 PERCENT *
FROM whatever
ORDER BY rating ASC



and



SELECT TOP 75 PERCENT *
FROM whatever
ORDER BY rating DESC




Hoping it may help,
Vanderghast, Access MVP
 
Back
Top