KyselyK
Kysely3y ago
4 replies
liteyear.

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)
Was this page helpful?