This simple query is a starter for an AR report, it displays data by month (sales, payments, net) and adds a running total
The final output looks like this: