SELECT inname, SUM( bill_total ) AS customer_total FROM csrBillTotals ; GROUP BY inname ; ORDER BY inname INTO CURSOR csrCustomer_totalsYou can relate the 2 cursors like this:
SELECT csrCustomer_totals INDEX ON inname TAG inname SELECT csrBillTotals SET RELATION TO inname INTO csrCustomer_totals