Виктор Егоров wrote:
> 2012/10/20 Berend Tober <btober@broadstripe.net>:
>> Your suggestion almost worked as is for this, except that you have to note
>> that reading for meter #2 and meter #3 overlap ...
> You can do
> … OVER(PARTITION BY electric_meter_pk ORDER BY reading_date)
> to split you data by meter.
>
That looks like it works great! Much simpler-looking SQL than what I was
working on.
Thanks!