I have an table with 2 records ( illustrative purpose )
| id | access (int array) |
| ---------------------------- |
| 1 | {0,1,0} |
| 2 | {1,0,0} |
I'd like to select both values and merge them together
to get the highest value making the result in this case:
{1,1,0}
The access array could grow to over 200 values and therefor i'd like to avoid to do it in the programming code, ( golang ).
Basically it is the same as this question : Merge two (or more) arrays and keep values that are highest? but in my case the seperated columns are combined into one field with an array.
UPDATES
- The
row(access)
array's always have the same amount of values