Reputation: 21
I have 'table' where i store 'rate' values every 30 minutes ('date' field). I want to get each day maximums (peaks). How can I select with one mysql request? Thanx...
Upvotes: 2
Views: 2456
Reputation: 1
If the date field is a Unix timestamp, try:
SELECT time, MAX(data) FROM table GROUP BY DAY(FROM_UNIXTIME(time))
Upvotes: 0
Reputation: 1464
SELECT MAX(rate) FROM 'table' GROUP BY DAY(date)
Should work for you :)
Upvotes: 7