What is the opening amount for the customer with the customer code 'C00020' in the CUSTOMER table?
{
    "explanation": "I finalized the SQL query by joining the CUSTOMER and AGENTS tables on the AGENT_CODE column, and then joining the resulting table with the ORDERS table on the CUST_CODE and AGENT_CODE columns. I used the CUSTOMER table to filter the customer with the customer code 'C00020' and then used the ORDERS table to get the opening amount for that customer.",
    "query" : "SELECT c.CUST_CODE, c.CUST_NAME, o.ADVANCE_AMOUNT, o.ORD_AMOUNT, o.ORD_DATE, a.AGENT_NAME, a.AGENT_CODE FROM CUSTOMER c JOIN AGENTS a ON c.AGENT_CODE = a.AGENT_CODE JOIN ORDERS o ON c.CUST_CODE = o.CUST_CODE AND c.AGENT_CODE = o.AGENT_CODE WHERE c.CUST_CODE = 'C00020'",
    "operation_kind" : "aggregation",
    "schema": "CUSTOMER, AGENTS, ORDERS",
    "confidence" : "100",
    "general_message": "Here is the opening amount for the customer with the customer code 'C00020'",
    "main_entity" : "customer"
}