I have a scenario in which I have two logger one is for "writing to database" and the other is "successfully completed". Am trying for query which you give result when the first loggers is present but the second logger is missing to set alert when it fails to write to DB.
Can you provide a sample of each event? Is there a common value that helps you tie the "writing to database" to the "successfully completed"? You could possibly use transaction command but will need more info from you regarding the events?