Parsing through transactions and events. Group the queries based on transactions