Retrieve the total outstanding amount for all customers.
{
    "explanation": "I finalized the SQL query by analyzing the schema and context provided. The question asks for the total outstanding amount for all customers. I used the CUSTOMER table to get the total outstanding amount for each customer and then used a GROUP BY clause to get the total outstanding amount for all customers.",
    "query" : "SELECT c.CUST_CODE, c.CUST_NAME, SUM(o.OUTSTANDING_AMT) AS TOTAL_OUTSTANDING_AMOUNT FROM CUSTOMER c JOIN ORDERS o ON c.CUST_CODE = o.CUST_CODE GROUP BY c.CUST_CODE, c.CUST_NAME",
    "operation_kind" : "aggregation",
    "schema": "CUSTOMER, ORDERS",
    "confidence" : "100",
    "general_message": "Here is the total outstanding amount for all customers",
    "main_entity" : "customer"
}