title: Access - how to add 2 columns and subtract 1
body: <p>I've uploaded a screenshot and the SQL query below as reference. What I am trying to achieve is finding out the profit/loss by adding up the field 'SubscriptionFee' and 'UNIFORM_UniformPrice' together and then subtract  'UNIFORM_SUPPLY_UniformPrice's total. </p>
  
  <p>Pretty much [SubscriptionFee] + [UNIFORM_UniformPrice] - [UNIFORM_SUPPLY_UniformPrice]
  is what I am trying to do but I can't figure out how to make it work. </p>
  
  <p>When I try to run:</p>
  
  <pre><code>Sum([UNIFORM_UniformPrice]+[SubscriptionFee]-[UNIFORM_SUPPLY_UniformPrice]) AS Total
  </code></pre>
  
  <p>An error pops up saying:</p>
  
  <blockquote>
    <p>your query does not include the specified expression 'Subscriptionfee' as part of an
    aggregate function</p>
  </blockquote>
  
  <p>The apparent fix seems to be adding a "group by" but I have no idea how I type it out or if that is the fix for my issue.</p>
  
  <p>SQL Query:</p>
  
  <pre><code>SELECT subscription.subscriptionfee, 
     uniform.uniformprice        AS UNIFORM_UniformPrice, 
     uniform_supply.uniformprice AS UNIFORM_SUPPLY_UniformPrice, 
     SUM([uniform_uniformprice] + [subscriptionfee] 
         - [uniform_supply_uniformprice]) 
                                 AS Expr1 
  FROM   (((uniform_supply 
        INNER JOIN staff_order 
                ON uniform_supply.[uniformsupplyid] = 
                   staff_order.[uniformsupplyid]) 
       INNER JOIN uniform 
               ON uniform_supply.[uniformsupplyid] = 
      uniform.[uniformsupplyid]) 
      INNER JOIN (subscription 
                  INNER JOIN student_order 
                          ON subscription.[subscriptionno] = 
                             student_order.[subscriptionid]) 
              ON uniform.[uniformproductid] = 
     student_order.[uniformproductid]) 
     INNER JOIN invoice 
             ON student_order.[orderid] = invoice.[orderid]; 
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/XUuvZ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/XUuvZ.png" alt="enter image description here"></a></p>