This is a discussion on grouping results within the MySQL forums, part of the Database Server Software category; --> Hello. I would like to select only changes in value: time (datetime) bits (integer) in command: select time,(bits>>8)&1 as ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| 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 help me? |