select * from t_lien_jour_frais where montant != base and base != 0 and date_jour > "2017-05-01" and automatic=2 Correction en 2 étapes : update t_lien_jour_frais set etranger = 1 where montant != base and base != 0 and date_jour > "2017-07-01" and automatic = 2 update t_lien_jour_frais set montant = base where etranger = 1 and date_jour >"2017-07-01" and automatic=2 évaluation correction frais francais / frais etranger select tf.cle_chauffeur, nom_conducteur, prenom_conducteur, sum(montant-montant_france) from t_lien_jour_frais tf join t_frais f on f.cle = tf.cle_frais join t_conducteur c on tf.cle_chauffeur = c.cle_chauffeur where etranger = 1 and date_jour >="2017-07-01" group by tf.cle_chauffeur order by nom_conducteur