Which claims caused more than 2 settlements or have the maximum claim value? List the date the claim was made and the claim id.
CREATE TABLE Settlements (Claim_id VARCHAR); CREATE TABLE Claims (Amount_Claimed INTEGER); CREATE TABLE Claims (Date_Claim_Made VARCHAR, Claim_id VARCHAR, Amount_Claimed INTEGER)
[SQL] SELECT T1.Date_Claim_Made, T1.Claim_id FROM Claims AS T1 JOIN Settlements AS T2 ON T1.Claim_id = T2.Claim_id GROUP BY T1.Claim_id HAVING COUNT(*) > 2 UNION SELECT T1.Date_Claim_Made, T1.Claim_id FROM Claims AS T1 JOIN Settlements AS T2 ON T1.Claim_id = T2.Claim_id WHERE T1.Amount_Claimed = (SELECT MAX(Amount_Claimed) FROM Claims) [/SQL]