Postgres interpolate and group


This Content is from Stack Overflow. Question asked by ziazo

I want to check my heating gas consumption for this winter.
For the recent winters I have only the value of gas meter per 31.03 of each year.

Lets assume my heating Period is from 15.09.2017-31.03.18.
So this are 197 and my consumption in this period was 400m3.
So I have needed 2,03m3 per day in avg.

What I would like to see is a interpolation and grouping by month. But I dont know really where to start.

As Result I image something like this:


This question is not yet answered, be the first one who answer using the comment. Later the confirmed answer will be published as the solution.

This Question and Answer are collected from stackoverflow and tested by JTuto community, is licensed under the terms of CC BY-SA 2.5. - CC BY-SA 3.0. - CC BY-SA 4.0.

people found this article helpful. What about you?