add condition_sql optimization to "Customer has a referring customer with uncancelled...