2
I’ve been cracking my head here to mount an SQL, maybe someone can help me.
I’m trying to draft a report to charge the relationship notes that were eventually deleted.
The user registers an nf in the system that has as initial status "related", but in some cases he needs to delete this nf that goes from "related" status to "deleted", and makes another, a new record is made for that same nf, with different id, but with nf number equal to previous but now with status "related".
Finally, I wanted an sql query that is considered the last record of an nf that has status of "deleted".
For example, I have the following query:
SELECT id, nf, status, date FROM documentos
The statement returns the following records:
As it should be, from the above result I want to know only the last record of a certain nf when it is status "deleted".
I’m using Mysql to query.
summarizing, Oce wants to know which tax notes were excluded and were not inserted again
– Rovann Linhalis
Invoice as far as I know can’t be ruled out.
– Renato Junior