What is the total received amount from customers of Londen City.
{
    "explanation": "I finalized the SQL query by joining the 'ORDERS' table with the 'CUSTOMER' and 'AGENTS' tables on the 'CUST_CODE' and 'AGENT_CODE' columns respectively. I used the 'WORKING_AREA' column in the 'CUSTOMER' table to filter customers from London City. I used the 'AGENT_NAME' column in the 'AGENTS' table to filter agents from London City.",
    "query" : "SELECT 'Customer' AS main_entity, 'Total Received Amount' AS description, SUM(o.ORD_AMOUNT + o.ADVANCE_AMOUNT) AS total_received_amount, c.CUST_NAME, c.CUST_CITY, a.AGENT_NAME, a.WORKING_AREA, a.COUNTRY FROM ORDERS o JOIN CUSTOMER c ON o.CUST_CODE = c.CUST_CODE JOIN AGENTS a ON o.AGENT_CODE = a.AGENT_CODE WHERE LOWER(c.CUST_CITY) LIKE '%london city%' AND LOWER(a.WORKING_AREA) LIKE '%london city%' GROUP BY c.CUST_NAME, c.CUST_CITY, a.AGENT_NAME, a.WORKING_AREA, a.COUNTRY",
    "operation_kind" : "aggregation",
    "schema": "ORDERS, CUSTOMER, AGENTS",
    "confidence" : "100",
    "general_message": "Here is the total received amount from customers of London City",
    "main_entity" : "Customer"
}