1587.sql (145B)
1 SELECT name, SUM(amount) as balance 2 FROM Users U 3 LEFT JOIN Transactions T 4 ON U.account = T.account 5 GROUP BY U.account 6 HAVING SUM(amount) > 10000