erSQL an Example
Customer NickNameInc collects so called compound orders on behalf of customers. The goods must be delivered to NickNameInc in bulk to reduce shipping cost.
The payments however are paid directly by the individual customers. If the total amount due has not been paid, the company sends a report to NickNameInc. It is their job to chase the outstanding payments. A report is required which shows all orders which are due (Order.Status = 'Closed') and all payments received from the customers for order of NickNameInc, including the names of these customers.