class Solution {
public int maximumWealth(int[][] accounts) {
int max = 0;
for (int[] account : accounts) {
int sum = 0;
for (int i : account) {
sum += i;
if (sum > max) max = sum;
}
}
return max;
}
}
SELECT max(personbalance)
FROM
(
Select
sum(balance)
FROM
persons
join accountof
join bankaccounts
GROUP BY persons.id
)