title: Subquery returns more than 1 row in select statement
body: <p>Suppose I had two tables, orderdetails and orders.</p>
  
  <p>I would like to print orderDate, the status of the order &amp; the total price.</p>
  
  <p>In the orderdetails table, there is orderNumber, quantityOrdered, priceEach &amp; productCode.</p>
  
  <p>In the orders, there is status &amp; orderNumber.</p>
  
  <p>I have tried this code but it will not work.</p>
  
  <pre><code>SELECT orderDate, status,  (SELECT SUM(quantityOrdered * priceEach) AS prices FROM orderdetails GROUP BY orderNumber)
  
  FROM orders o, orderdetails od
  
  WHERE od.orderNumber = o.orderNumber
  </code></pre>