I have two tables:
monitor_carro
id serial | setor_id | modelo | ano | placa
monitor_evento
id serial | lat | long | data | fkfuncionario_id | time | carro
The monitor_evento table only has a foreign key that is official and in both tables the primary key is the serial id .
Assuming I have several cars inserted in the monitor_carro table and have several entries of these cars in my bd. I would like an help to return the last entry of each car in the monitor_evento table.
Could anyone help me with this?
Thank you in advance.