Getting minimum values with a query

  • Thread starter Thread starter Arthur Amos
  • Start date Start date
A

Arthur Amos

Suppose I have a table structured like this:

RecID PersonID ValueField

Each person appears in multiple rows with different
values in the ValueField. I want to create a query that
will retrieve only those rows where the ValueField value
is the smallest for that person.

Help please.
 
Suppose I have a table structured like this:

RecID PersonID ValueField

Each person appears in multiple rows with different
values in the ValueField. I want to create a query that
will retrieve only those rows where the ValueField value
is the smallest for that person.

Help please.

Create a Query based on the table; on the Criteria line under
ValueField put

=(SELECT Min([Valuefield]) FROM yourtable AS X WHERE X.PersonID =
yourtable.PersonID)
 
Back
Top