Discussion: MySQL group
Afficher un message
Vieux 17/09/2007, 18h10   #1
jbl
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut MySQL group

Hello.
I would like to select only changes in value:
time (datetime)
bits (integer)
in command:
select time,(bits>>8)&1 as P from VV order by time
I view this result:
time P
12:23:11 0
12:23:16 0
12:24:01 0
12:24:10 1
12:24:23 1
12:24:45 0
12:25:01 0
12:25:34 1
12:25:59 1

And how to obtain this result:
12:23:11 0
12:24:10 1
12:24:45 0
12:25:34 1

The group clause selects only two rows:
12:23:11 0 the first "0" value
12:24:10 1 the first "1" value

Can you me?

  Réponse avec citation
 
Page generated in 0,08079 seconds with 9 queries