Database: insurance_fnol

Question: Find the names of customers who have used either the service "Close a policy" or the service "Upgrade a policy".
SQL: SELECT t1.customer_name FROM customers AS t1 JOIN first_notification_of_loss AS t2 ON t1.customer_id  =  t2.customer_id JOIN services AS t3 ON t2.service_id  =  t3.service_id WHERE t3.service_name  =  "Close a policy" OR t3.service_name  =  "Upgrade a policy"

Question: Find the names of customers who have used both the service "Close a policy" and the service "New policy application".
SQL: SELECT t1.customer_name FROM customers AS t1 JOIN first_notification_of_loss AS t2 ON t1.customer_id  =  t2.customer_id JOIN services AS t3 ON t2.service_id  =  t3.service_id WHERE t3.service_name  =  "Close a policy" INTERSECT SELECT t1.customer_name FROM customers AS t1 JOIN first_notification_of_loss AS t2 ON t1.customer_id  =  t2.customer_id JOIN services AS t3 ON t2.service_id  =  t3.service_id WHERE t3.service_name  =  "New policy application"

Question: Find the IDs of customers whose name contains "Diana".
SQL: SELECT customer_id FROM customers WHERE customer_name LIKE "%Diana%"

Question: What are the maximum and minimum settlement amount on record?
SQL: SELECT max(settlement_amount) ,  min(settlement_amount) FROM settlements