Found a fun bug in 2022.1 for the query module. If you try and do an aggregate query on transactions and group on a list record field and use its display context it fails. So trying to group on entity and summing amount fails in this example. No idea what they did but it worked previously in 2021.2