sql - MySQL: Select corresponding row for maximum value grouped by date -


i have table hourly temperatures:

id   timestamp   temperature 

i want select highest temperature , corresponding timestamp each day.

select max(temperature), timestamp table group date(from_unixtime(timestamp)) 

does not work because returns timestamp of first row (but need timestamp row highest temperature).

any suggestions appreciated.

try one....

select max(temperature), timestamp temp group unix_timestamp(date(timestamp)); 

Comments

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -