I would like to know what is the equivalent to $__timeGroup(dateColumn,‘5m’, 0) in MySQL. I am specifically interested about the part that makes missing values to be 0.
I know that something like unix_timestamp(concat(DATE_FORMAT(dateColumn, '%Y-%m'), '-01')) as time can be used. But this does not cover the cases when the value is missing.
The reason for this being implemented in backend was due to we didn’t find any pure SQL solution and/or solution with good performance. If possible, maybe you could implement some kind of function that could help, but I’m just guessing here.