mysql> SELECT
-> sn,Clientsn,createdtime
-> FROM
-> ClientCashDetail
-> WHERE
-> createdTime < '2015-12-25 00:00:00'
-> GROUP BY clientSn
-> ORDER BY createdtime DESC;
+-------+----------+---------------------+
| sn | Clientsn | createdtime |
+-------+----------+---------------------+
| 20146 | 12904 | 2015-12-28 18:51:59 |
| 20143 | 501 | 2015-12-28 17:36:21 |
| 20141 | 1177 | 2015-12-28 17:12:55 |
| 20135 | 57 | 2015-12-28 16:47:43 |
| 20124 | 1407 | 2015-12-28 16:19:15 |
| 20108 | 12808 | 2015-12-28 16:05:52 |
| 20107 | 592 | 2015-12-28 16:05:33 |
| 20102 | 12738 | 2015-12-28 16:03:21 |
| 20094 | 1570 | 2015-12-28 15:59:33 |
| 20091 | 2102 | 2015-12-28 15:57:18 |
| 20086 | 1659 | 2015-12-28 15:50:31 |
| 20084 | 13006 | 2015-12-28 15
mysql group 陷阱
最新推荐文章于 2021-01-27 17:14:13 发布