Do we have something similar in ecto?

hi. I have a query that is doing the sum of jsonb values and I’m using postgres 9.6. So my query looks like this

select, sum(tt.value::text::numeric) val
    from my_table t, jsonb_each(total) AS tt
    where jsonb_typeof(tt.value) = 'number'
    group by

I need to add this sum(tt.value::text::numeric) which I’m not sure how to do it in ecto?

Check json_extract_path

And combine with sum

or fragment