MYSQ request | GROUP BY DAY

Posted by user889349 on Stack Overflow See other posts from Stack Overflow or by user889349
Published on 2012-05-31T10:37:33Z Indexed on 2012/05/31 10:40 UTC
Read the original article Hit count: 260

Filed under:
|
|
|

I have a table: orders, and need to make a request and get other table. My DB table:

id  close
1   2012-05-29 03:11:15
2   2012-05-30 03:11:40
3   2012-05-31 03:12:10
4   2012-05-31 03:14:13
5   2012-05-31 03:16:50
6   2012-05-31 03:40:07     
7   2012-05-31 05:22:18
8   2012-05-31 05:22:22
9   2012-05-31 05:22:50
...

I need to make a request and get this table (GROUP BY DAY(close)):

1   2012-05-29 03:11:15
2   2012-05-30 03:11:40
9   2012-05-31 05:22:50 /*This is a last record on this day (05-31)*/

Thanks!

© Stack Overflow or respective owner

Related posts about php

Related posts about mysql