If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Problem with percentages
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! |
#2
|
|||
|
|||
Problem with percentages
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. -- KARL DEWEY Build a little - Test a little "Golfinray" wrote: 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! |
#3
|
|||
|
|||
Problem with percentages
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 "Golfinray" wrote in message ... 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! |
Thread Tools | |
Display Modes | |
|
|