Continuous query - tag hour in day

Hi,

In the end I would like to get data from multiple days and sum the energy consumption per hour in a day:

The only way I have found that might work is to create tags with the hour of day.

br
Stian