Considering I have more than 30 registers/day for that temperature.
I want one registration for each day, for example:
date: 2015-12-10 12:02 id: 2341 tempa: 54 (which is the highest on that day)
date: 2015-12-09 15:04 id 1923 tempa: 32 (which is the highest on that day)
and so on....
您可以使用max和group by
select max(TempA) from your_table group by day_column
select id from temperatures where TempA=(select max(TempA) from temperatures )
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.