Z
ZpoonZ
Guest
i want to write a query that returns the record with the lowest value in it's group.
so if i had the following records.
color, value, time, name
orange, 1, day, bill
orange, 24, day, trevor
orange, 3, day, sally
orange, 2, night, sally
orange, 4, night, bill
so grouped by time and color, i'd get two results (bill/1, and sally/2)
orange, day, bill
orange, night, sally
i'm not sure of the easiest way to do this. is there an easiest way (ie. within one query)? or would i need to do a few queries and create look-ups etc. ?
any help would be appreciated!
so if i had the following records.
color, value, time, name
orange, 1, day, bill
orange, 24, day, trevor
orange, 3, day, sally
orange, 2, night, sally
orange, 4, night, bill
so grouped by time and color, i'd get two results (bill/1, and sally/2)
orange, day, bill
orange, night, sally
i'm not sure of the easiest way to do this. is there an easiest way (ie. within one query)? or would i need to do a few queries and create look-ups etc. ?
any help would be appreciated!