Value of another field in the row that contains MAX(field)
Posted: Fri Oct 07, 2005 11:31 am
Okay, that subject is clear as mud, but it's the best I could do.
I have a table with two fields: "Seq" which is an int, and "Typ" which is an ENUM('Q','A'). (There's more than those two, but...) I know how to write a query to find out the maximum value for "Seq" but I don't really care about that value. What I want to know is the value of "Typ" in the row that contains that maximum value. Is there a single query to do that?
I have a table with two fields: "Seq" which is an int, and "Typ" which is an ENUM('Q','A'). (There's more than those two, but...) I know how to write a query to find out the maximum value for "Seq" but I don't really care about that value. What I want to know is the value of "Typ" in the row that contains that maximum value. Is there a single query to do that?