Leetcode Note: MySQL - Bank Account Summary II

Bank Account Summary II - LeetCode
https://leetcode.com/problems/bank-account-summary-ii/

  • MySQL で取り組んだメモ

回答

straight forward mysql solution - Bank Account Summary II - LeetCode
https://leetcode.com/problems/bank-account-summary-ii/solutions/851440/straight-forward-mysql-solution/

select
    a.name,
    sum(b.amount) balance
from
    Users a
join
    Transactions b
on
    a.account = b.account
group by
    a.account
having
    balance > 10000;