I have a problem I have a table that has the serial column, equipment and a timestamp date has no primary key because this table would be a history, I in the table I have several lines with the same serial but I need to bring the last date only I need to bring in a single line, but when I put the group by serial order by timestamp desc
it does not bring the last inserted date as that I would do this follows the query below:
SELECT * FROM spare_change.cad_checklist group by serial order by timestamp desc ;
The return would be
serial | equipamento | data
60 | item | 2010-04-05 10:30:58
The last date would be for example the following 2010-04-06 09:59:10