Good afternoon
I'm trying to select all the last results from a range of hosts that are performing tests, and their results are written in one table.
For instance, I have a table with 3 users and the fields:
ID Timeofexecution Result
UserA 2013-03-10 13
UserA 2013-03-09 9
UserA 2013-03-08 54
UserB 2013-03-12 1
UserB 2013-03-11 19
UserC 2013-03-11 132
I'm trying to create a query that returns me the last results from the 3 users.
Expected output:
ID ||| Timeofexecution ||| Result
UserA ||| 2013-03-10 ||| 13
UserB ||| 2013-03-12 1
UserC ||| 2013-03-11 132
+-----------------+------------------------+
| identifierValue | max(time_of_execution) |
+-----------------+------------------------+
| X-SONDA44 | 2013-06-12 19:21:36 |
+-----------------+------------------------+
I´ve created the query that returns me the last result filtered by timeofexecution:
select id,max(time_of_execution) from results_tbl where ID LIKE '%User%';
but it only returns me the last entry in the table, and not the last entries of each user.
Please help
Best wishes
I'm trying to select all the last results from a range of hosts that are performing tests, and their results are written in one table.
For instance, I have a table with 3 users and the fields:
ID Timeofexecution Result
UserA 2013-03-10 13
UserA 2013-03-09 9
UserA 2013-03-08 54
UserB 2013-03-12 1
UserB 2013-03-11 19
UserC 2013-03-11 132
I'm trying to create a query that returns me the last results from the 3 users.
Expected output:
ID ||| Timeofexecution ||| Result
UserA ||| 2013-03-10 ||| 13
UserB ||| 2013-03-12 1
UserC ||| 2013-03-11 132
+-----------------+------------------------+
| identifierValue | max(time_of_execution) |
+-----------------+------------------------+
| X-SONDA44 | 2013-06-12 19:21:36 |
+-----------------+------------------------+
I´ve created the query that returns me the last result filtered by timeofexecution:
select id,max(time_of_execution) from results_tbl where ID LIKE '%User%';
but it only returns me the last entry in the table, and not the last entries of each user.
Please help
Best wishes