Quantcast
Viewing all articles
Browse latest Browse all 35

rolling-up consecutive duplicates

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!


Viewing all articles
Browse latest Browse all 35

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>