now using pgsql to groupdate work, showing average_consumption in the chart