I was wondering if someone could offer some help. I have the following table structure
RESULTS:
[Contaminant] [Date] [EmployeeID] [Value] [Rank]
I need to group these values so that they have the same: Contaminant, Date, and EmployeeID. I then need to select only the lowest ranked value. If I try and use the query builder I pull in [Contaminant] and sort GROUPBY, [Date] and sort GROUPBY, [EmployeeID] and sort GROUPBY, and finally [Rank] and sort MIN. How can I add the value to the results of this query, if I use groupBy I obviously get all the records again, unless they happen to match among all values.
I think this is not allowed due to the fact that some of the values in my suggested grouping might have the same rank.. though I have entered the data so as they do not.
Any ideas on a work around? I have thought maybe using this query and joining on all fields to the original dataset.. help?
RESULTS:
[Contaminant] [Date] [EmployeeID] [Value] [Rank]
I need to group these values so that they have the same: Contaminant, Date, and EmployeeID. I then need to select only the lowest ranked value. If I try and use the query builder I pull in [Contaminant] and sort GROUPBY, [Date] and sort GROUPBY, [EmployeeID] and sort GROUPBY, and finally [Rank] and sort MIN. How can I add the value to the results of this query, if I use groupBy I obviously get all the records again, unless they happen to match among all values.
I think this is not allowed due to the fact that some of the values in my suggested grouping might have the same rank.. though I have entered the data so as they do not.
Any ideas on a work around? I have thought maybe using this query and joining on all fields to the original dataset.. help?