2
Explaining the title:
I have a table called projects, these projects can be approved or disapproved.
Each insertion or update of a record in the project table is saved in a history table (e.g.: I recorded a project and then updated it 2 times / In the history table we will have 3 tuples).
Usually these are approved and flunked several times, and very rarely after approved can be flunked again.
My goal is to make a query that shows only the ID’s that have the last registration date with the situation flunked.
That is, if I have a project that has failed, failed and failed.
He should show up at the appointment.
If he failed, approved and disapproved.
It should also appear in the query.
Yes, put the relevant section of your tables, to help you in SQL.
– Vinícius Gobbo A. de Oliveira