Hello, I was wondering how many claims are made?
select count ( * ) from claims
About how many settlements does each claim correspond to?
select t1.claim_id, count ( * ) from claims as t1 join settlements as t2 on t1.claim_id = t2.claim_id group by t1.claim_id
No problem, what is the average amount of days for a claim to be settled?
select avg ( date_claim_settled - date_claim_made ) from claims
Yes, both.
select t2.settlement_id,t2.amount_claimed,t2.amount_settled from claims as t1 join settlements as t2 on t1.claim_id = t2.claim_id where t1.claim_id = 801