What is the total receive amount across all customers in the CUSTOMER table?
{
    "explanation": "I finalized the SQL query by analyzing the schema and context provided. The question asks for the total receive amount across all customers in the CUSTOMER table. I used the CUSTOMER table and applied the GROUP BY clause to calculate the total receive amount for each customer. I also used the SUM aggregation function to calculate the total receive amount.",
    "query" : "SELECT C.CUST_CODE, SUM(O.RECEIVE_AMOUNT) AS TOTAL_RECEIVE_AMOUNT FROM CUSTOMER C JOIN ORDERS O ON C.CUST_CODE = O.CUST_CODE GROUP BY C.CUST_CODE",
    "operation_kind" : "aggregation",
    "schema": "CUSTOMER, ORDERS",
    "confidence" : "100",
    "general_message": "Here is the total receive amount across all customers",
    "main_entity" : "customer"
}