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)
 

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