Suppose I have a table of values and times. Is there a single sql query that will return the max value and the time that's associated with it?
Printable View
Suppose I have a table of values and times. Is there a single sql query that will return the max value and the time that's associated with it?
Can post more detail. You can do something like
select * from table
where time=
select max(time) from table
Thanks. I was hoping that there was some magic way to do this in one select, but I should have known better.
It is one select with subquery.