CREATE TABLE services (service_id DECIMAL, service_name TEXT)
CREATE TABLE first_notification_of_loss (fnol_id DECIMAL, customer_id DECIMAL, policy_id DECIMAL, service_id DECIMAL)
CREATE TABLE customers (customer_id DECIMAL, customer_name TEXT)
CREATE TABLE claims (claim_id DECIMAL, fnol_id DECIMAL, effective_date TIME)
CREATE TABLE settlements (settlement_id DECIMAL, claim_id DECIMAL, effective_date TIME, settlement_amount DECIMAL)
CREATE TABLE available_policies (policy_id DECIMAL, policy_type_code TEXT, customer_phone TEXT)
CREATE TABLE customers_policies (customer_id DECIMAL, policy_id DECIMAL, date_opened TIME, date_closed TIME)

Find the claim that has the largest total settlement amount. Return the effective date of the claim.
SELECT t1.effective_date FROM claims AS t1 JOIN settlements AS t2 ON t1.claim_id = t2.claim_id GROUP BY t1.claim_id ORDER BY SUM(t2.settlement_amount) DESC LIMIT 1
SELECT "t1"."effective_date" FROM "claims" AS "t1" JOIN "settlements" AS "t2" ON "t1"."claim_id" = "t2"."claim_id" GROUP BY "t1"."claim_id" ORDER BY SUM("t2"."settlement_amount") DESC NULLS LAST LIMIT 1