MySQL Forums
Forum List  »  French

Re: Compte changement de valeur
Posted by: Martin Fafard
Date: March 04, 2020 07:04AM

Peter

J'ai simplifié mais j'ai bel et bien une clé primaire (integer incrémentiel).
J'utilise la version 5.7 parce que je suis sur AWS Aurora.

Mon date/heure est un timestamp (il y a un problème ici?)

Pour l'instant, j'ai ça (plus bas), mais j'ai un problème: étant donné qu'il arrive que des données sont effacées, mon gid incrémentiel n'est pas toujours "+1"...Je manque donc des entrées

pomp_4_marche est mon champs 0/1


Select t1.gid, t1.pomp_4_marche, t2.pomp_4_marche
From matable t1
join matable t2
on t1.gid = t2.gid + 1
where t1.pomp_4_marche = 0 and t2.pomp_4_marche = 1
and t1.pomp_4_marche is not null
order by t1.gid asc

Options: ReplyQuote


Subject
Views
Written By
Posted
700
March 03, 2020 12:38PM
391
March 03, 2020 03:49PM
Re: Compte changement de valeur
406
March 04, 2020 07:04AM
415
March 04, 2020 11:32AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.