I have this table that represents testcase executions, for one particular testcase there could be many executions with different statuses.
id | testcase_id | status | timestamp
-------------------------------------------------------
1 | 2 | fail | 2013-01-11 15:00:00
-------------------------------------------------------
2 | 2 | pass | 2013-01-11 15:05:00
-------------------------------------------------------
3 | 4 | fail | 2013-01-11 16:00:00
-------------------------------------------------------
4 | 4 | pass | 2013-01-11 16:04:00
And what I'd like to extract from this table is the latest execution results, ie:
id | testcase_id | status | timestamp
-------------------------------------------------------
2 | 2 | pass | 2013-01-11 15:05:00
-------------------------------------------------------
4 | 4 | pass | 2013-01-11 16:04:00
How could I achieve this??