Thanks for replying! But clearly my question was badly formed. What I’m looking for is a query that would give me the total value of payments grouped by payment type. In the case I put in the original question, I would get:
total: 20
cashTotal: 23 (8 given as change)
cardTotal: 5
Does that make sense?