You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a JSONB column, which is a array of numbers. how can I modify the cubes to accept the sum of this pattern?
I already found a way to do the SUM in the SQL:
SELECT index
, (SELECT sum(nr::numeric) FROM jsonb_array_elements(snx_wavelengths) nr) AS wavelength_sum
FROM tbl
ORDER BY 1;
but I don't know how to implement this part in existent code: (SELECT sum(nr::numeric) FROM jsonb_array_elements(snx_wavelengths) nr) AS wavelength_sum
I already tried to put the SQL direct on the functions, but no success.
In the future, I would like to create new functions like avg, standard deviation, etc..
Hello guys, I'm working with Postgresql + Cubes.
I have a JSONB column, which is a array of numbers. how can I modify the cubes to accept the sum of this pattern?
I already found a way to do the SUM in the SQL:
but I don't know how to implement this part in existent code:
(SELECT sum(nr::numeric) FROM jsonb_array_elements(snx_wavelengths) nr) AS wavelength_sum
I already tried to put the SQL direct on the functions, but no success.
In the future, I would like to create new functions like avg, standard deviation, etc..
Anyone can give me some path how to do that?
@Stiivi @pktippa
The text was updated successfully, but these errors were encountered: