What are the ids of all the electoral register?
select electoral_register_id from electoral_register
What about their cross reference source system codes?
select t1.electoral_register_id, t2.source_system_code from electoral_register as t1 join cmi_cross_references as t2 on t1.cmi_cross_ref_id = t2.cmi_cross_ref_id
Show me those with source system code 'Electoral' or 'Tax'.
select t1.electoral_register_id from electoral_register as t1 join cmi_cross_references as t2 on t1.cmi_cross_ref_id = t2.cmi_cross_ref_id where t2.source_system_code = 'Electoral' or t2.source_system_code = 'Tax'