Skip to content
Advertisement

Average per hour adding an empty record if data is missing

I have this data:

I need to store the average of each hour in a second table.
I don’t know if I can also insert a NULL record if there is no data for an hour, maybe in a second treatment.

I have tried with this first treatment but can’t do it.

I get an error message and don’t know which operand it is.

Creation of datasets:

Advertisement

Answer

This looks like conditional aggregation:

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement