Rank and Select by Group

  • Thread starter Thread starter fabissimo
  • Start date Start date
F

fabissimo

Hi all,

Does anyone know how to write a query that selects the forth smallest
observation for each group of observations?

Let's say we have

Country Sex Number
UK M -5
UK M 5
UK M 6
UK M 8
UK M 4
UK F -2
UK F -521
UK F -7
UK F -99
UK F 43
France M 3
....
....
the result will be
UK M 6
UK F -2
....
...

thanks!
 
Hi all,

Does anyone know how to write a query that selects the forth smallest
observation for each group of observations?

Let's say we have

Country Sex Number
UK M -5
UK M 5
UK M 6
UK M 8
UK M 4
UK F -2
UK F -521
UK F -7
UK F -99
UK F 43
France M 3
...
...
the result will be
UK M 6
UK F -2
...
..

thanks!

Try the technique I used in:

http://groups.google.com/group/comp.databases.ms-access/msg/7fb6eb508f22fa9d

James A. Fortune
(e-mail address removed)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top