title: Subquery to sum values from a column
body: <p>I use this code to sum an order for a certain date:</p>
  
  <pre><code>select od.OrderID, (od.unitprice * quantity) - ((od.unitprice * od.quantity) * discount) + freight as OrderSum
  from orders, [Order Details] as od
  where orderdate = '1996-12-12' and od.orderid = orders.orderid
  </code></pre>
  
  <p>The code above gives the following output table:</p>
  
  <pre><code>OrderID | OrderSum
  10380     370,37
  10380     506,63
  10381     119,99
  </code></pre>
  
  <p>Desired end result and output: I want to sum the values in the created column "OrderSum" above so that the output would be put in a column named "Total ordersum". In other words, the desired output table I actually want:</p>
  
  <pre><code>Total ordersum
  996,99
  </code></pre>
  
  <p>How can I add a subquery to the code above to solve this? I would be very thankful if someone could give a code sample.</p>