title: ORA-01427: single-row subquery returns more than one row error
body: <p>I have 2 tables (USERS and ACCOUNTS) with the following data in them:</p>
  
  <p><strong>USERS</strong></p>
  
  <pre><code>UserID     Name          Account_Number
  10         John Smith    13
  20         Alex Brown    14
  30         Mary Wade     34
  </code></pre>
  
  <p><strong>ACCOUNTS</strong></p>
  
  <pre><code>Account number     Amount     
  13                 40
  34                 30
  14                 30
  13                 60
  14                 10
  </code></pre>
  
  <p>I would like to know how I can write a query to return the following results:</p>
  
  <pre><code>UserID             Name           Total amount     
  13                 John Smith     100     
  14                 Alex Brown     40             
  34                 Mary Wade      30             
  </code></pre>
  
  <p>The query that I have tried is:</p>
  
  <pre><code>SELECT USER_ID, NAME, (SELECT SUM(AMOUNT) FROM ACCOUNTS GROUP BY ACCOUNT) AS TOTAL_AMOUNT
  FROM USERS
  JOIN ACCOUNTS
  USING(ACCOUNT_NUMBER)
  ORDER BY TOTAL_AMOUNT DESC;
  </code></pre>
  
  <p>When I execute this I get the following error: ORA-01427: single-row subquery returns more than one row.</p>
  
  <p>Does anyone know how I might be able to modify the query so that it works as intended?</p>
  
  <p>Thanks!</p>