How can I cast a jsonb value to a float8 in query?
I have a query that has a jsonb value in the db that will always be a number, and I want to sum it. how can I change this value to a number
fn.sum<number>('value')
what I want is:
fn.sum<number>('value'::float8)
1 Reply
There's no built-in function for cast yet. For now you can do this
Like this https://kyse.link/?p=s&i=hsLrQjoDULskJqgRlupI