A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Problem with percentages



 
 
Thread Tools Display Modes
  #1  
Old May 1st, 2008, 09:17 PM posted to microsoft.public.access.queries
Golfinray
external usenet poster
 
Posts: 1,597
Default 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  
Old May 1st, 2008, 10:24 PM posted to microsoft.public.access.queries
KARL DEWEY
external usenet poster
 
Posts: 10,767
Default 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  
Old May 2nd, 2008, 03:27 PM posted to microsoft.public.access.queries
Michel Walsh
external usenet poster
 
Posts: 2,404
Default 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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 05:18 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.