Is there a way to "roll up" duplicate records such as time-series data in MySQL? I'm currently doing this in the application code after retrieving full time-series but the transmission of mostly redundant rows seems a nuisance. Here is an example:
Original data:
date | state..30 | A..29 | A..28 | A..27 | D..26 | D..25 | A
Resultset with "rolled up" consecutive duplicate records:
date | state..28 | A..26 | D..25 | A
Thanks!