I have the following query:
select point_delivery_number, bin(time,1h) as time , AVG(self_coverage) as self_coverage , AVG(generation) as generation , AVG(consumption) as consumption
from "energy_datapoints"."formatted_group_raw"
GROUP BY point_delivery_number, bin(time, 1h)
ORDER BY time desc
The result is following:
I want to add an Z
to the time to indicate thats an UTC time format
Result should be then:
AT..... | 2021-05-31 21:00:00.00000Z | ... | ... | ...
I tried to use CONCAT
CONCAT(bin(time,1h), 'Z') as time
It says:
line 1:31: Unexpected parameters (timestamp, varchar(1)) for function 'CONCAT'
Is there maybe an better way of doing this?