Need SQL to get Max Value on Day in a table with hourly data
538263Dec 9 2008 — edited Dec 9 2008I've got a table 'tmp' with these columns :
id,day,hour,value
I want to get the 'hour' when max of 'value' is reached for each 'day'.
the query :
"SELECT id,day,hour,max(value) from tmp group by id,day,hour"
doesn't return the wanted rows.
Do you have any idea to get what I want ?