human
Schema:
Customers (Customer_ID, Customer_Details)
Customer_Policies (Policy_ID, Customer_ID, Policy_Type_Code, Start_Date, End_Date)
Claims (Claim_ID, Policy_ID, Date_Claim_Made, Date_Claim_Settled, Amount_Claimed, Amount_Settled)
Settlements (Settlement_ID, Claim_ID, Date_Claim_Made, Date_Claim_Settled, Amount_Claimed, Amount_Settled, Customer_Policy_ID)
Payments (Payment_ID, Settlement_ID, Payment_Method_Code, Date_Payment_Made, Amount_Payment)
Please answer with SQL.
assistant
Sure, I understand.
human
what's the policy id for claim id 143?
assistant
SELECT Policy_ID FROM Claims WHERE Claim_ID = '143';
human
What's the most recent claim date?
assistant
SELECT Date_Claim_Settled FROM Claims ORDER BY Date_Claim_Settled DESC LIMIT 1;
human
what was the amount claimed? | On this day? | yes
assistant
SELECT Amount_Claimed FROM Claims WHERE Date_Claim_Settled = "2018-03-09" ;