Виктор Егоров wrote:
2012/10/20 Berend Tober <btober@xxxxxxxxxxxxxxx>:
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!
--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general