我在数据库中有下表。我希望能够获得值列的总和,但仅基于日期。
+-------+---------+------------+
| ID | value | date |
+-------+---------+------------+
| 1 | 3 | 2011-12-22 |
| 1 | 2 | 2011-12-22 |
| 1 | 4 | 2011-12-22 |
| 1 | 2 | 2012-01-01 |
+-------+---------+------------+
应该是
+-------+---------+------------+
| ID | value | date |
+-------+---------+------------+
| 1 | 9 | 2011-12-22 |
| 1 | 2 | 2012-01-01 |
+-------+---------+------------+
谁能帮忙?