Postgresql – SUM same colum virtual result POSTGRES
SELECT (jsonb_array_elements((balance)::jsonb->'savings')->'amount')::float as virtual_balance FROM accounts WHERE id = 58117; Result: virtual_balance --------------- 162.09 0.16 I need to select this result to be added together, resulting in 162.25 the expected result should look like virtual_balance --------------- 162,25 I needed it…