我正在做这个项目,我需要做的一件事是选择一些数据
桌子:
id | unit_id | data1 | data2 | data 3 | data4 | TimeStamp
1 | 1 | 1 | 1 | 1 | 2012-10-18 18:17:42
2 | 1 | 2 | 2 | 2 | 2012-10-18 18:18:42
3 | 1 | 3 | 5 | 3 | 2012-10-20 18:19:42
4 | 1 | 4 | 7 | 4 | 2012-10-21 18:20:42
5 | 1 | 5 | 8 | 8 | 2012-10-22 18:21:42
6 | 2 | 1 | 1 | 1 | 2012-10-18 18:17:42
7 | 2 | 2 | 2 | 4 | 2012-10-19 18:18:42
8 | 2 | 3 | 2 | 5 | 2012-10-20 18:19:42
9 | 2 | 4 | 3 | 6 | 2012-10-21 18:20:42
我需要的是得到Single LATEST value for EACH unit_id