Find the number of records where the ORD_AMOUNT is less than the ADVANCE_AMOUNT in the ORDERS table.
{
    "explanation": "I finalized the SQL query by analyzing the schema and context provided. The question asks to find the number of records where the ORD_AMOUNT is less than the ADVANCE_AMOUNT in the ORDERS table. I used the ORDERS table and filtered the records using the WHERE clause with the condition ADVANCE_AMOUNT < ORD_AMOUNT. I also used the COUNT aggregation function to count the number of records that meet the condition.",
    "query" : "SELECT COUNT(o.ord_num) AS count FROM ORDERS o WHERE o.advance_amount < o.ord_amount",
    "operation_kind" : "aggregation",
    "schema": "ORDERS",
    "confidence" : "100",
    "general_message": "Here is the count of records where the ORD_AMOUNT is less than the ADVANCE_AMOUNT",
    "main_entity" : "ORDERS"
}