Skip to content
Advertisement

Flatten a subarray in postgresql

Input:

Expected (Sum of the value in each array)

I tried, but it only gives me the value of two first value in the first sub array:

Advertisement

Answer

You can use a scalar sub-select:

User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement