--- client-crm-id

UPDATE clients
SET
  crm_id        = (
    SELECT crm_id
    FROM crm_customers
    WHERE crm_customers.id = clients.customer_id
  ),
  crm_client_id = (
    SELECT external_id
    FROM crm_customers
    WHERE crm_customers.id = clients.customer_id
  );
