I want to convert 15 min interval table in postgres database to hourly intervals and also sum up all the values in the other columns as per that. How do I do this? what would the query be?
example:
timestamp count
"2015-01-05 12:00:00" 35
"2015-01-05 12:15:00" 45
"2015-01-05 12:30:00" 23
"2015-01-05 12:45:00" 23
"2015-01-05 01:00:00" 45
"2015-01-05 01:15:00" 12
"2015-01-05 01:30:00" 11
"2015-01-05 01:45:00" 56
I want the output table to be
timestamp count
2015-01-05 12:00:00 126
2015-01-05 01:00:00 124