leetCode-SQL
leetCode-SQL copied to clipboard
#1587
""" SELECT u.name, SUM(t.amount) AS 'balance' FROM Users u LEFT JOIN Transactions t ON u.account = t.account GROUP BY t.account HAVING balance > 10000 """
This answer would be problematic, because the select statement contains nonaggregated column or columns not specified by the groupby.