What are the policies of each customer? Give the names and policy type codes.
select t2.customer_details, t1.policy_type_code from policies as t1 join customers as t2 on t1.customer_id = t2.customer_id
Of these, show only those with jurisdiction policies.
select t2.customer_details, t1.policy_type_code from policies as t1 join customers as t2 on t1.customer_id = t2.customer_id where t1.policy_type_code = "Jurisdiction"
How about either deputy policy or uniformed policy?
select t2.customer_details, t1.policy_type_code from policies as t1 join customers as t2 on t1.customer_id = t2.customer_id where t1.policy_type_code = "Deputy" or t1.policy_type_code = "Uniformed"
Now show just the unique names for these.
select distinct t2.customer_details from policies as t1 join customers as t2 on t1.customer_id = t2.customer_id where t1.policy_type_code = "Deputy" or t1.policy_type_code = "Uniformed"