Having issues pairing data rows in SQL to identify when an item goes out, but does not return. The send and receive entries are on different rows, and there is a data relationship between the two, so I think this is doable, I'm just stumped as to the solution. The Module and User should tie together the transaction, however there is additionally a "batch" column that could be used to further ensure a unique transaction
Example Table Structure:
MODULE USER EVENTDTTM ACTION Batch
--------------------------------------------------------------------
MODULE1 USERB 2016-01-09 13:00:00 SENT 001
MODULE1 USERB 2016-01-09 13:01:00 RECEIVED 001
MODULE2 USERA 2016-01-09 13:00:00 SENT 001
MODULE2 USERA 2016-01-09 13:01:00 RECEIVED 001
MODULE1 USERA 2016-01-09 13:03:00 SENT 002
MODULE2 USERB 2016-01-09 13:04:00 SENT 002
I've tried a to do a join on the table itself, but I'm only seeing the paired data (with crazy amounts of duplicates)...I cant find the scenarios where an item was sent, but no paired receipt was found.