What is the effective date of the claim that has the largest amount of total settlement?
create table settlements (claim_id varchar, settlement_amount integer, PRIMARY KEY (claim_id)); create table claims (effective_date varchar, claim_id varchar, PRIMARY KEY (effective_date))
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