I have a table that stores all messages between users and a bot (basically a state machine), and I'm trying to find all pairs of message/response from this table, in order to calculate each user's average response time. The caveat is, that not all outgoing messages get a response. I have a table that stores all messages between