title: Subtract two numeric column values in Oracle query
body: <p>I need to subtract two column values and display the output column in select query. </p>
  
  <pre><code>SELECT c.name,
      (SELECT SUM(p.qty*s.price)
       FROM stock s, purchase p 
       WHERE s.company = p.company 
       GROUP BY p.company) 
   MINUS 
      (SELECT SUM(p.price*p.qty) 
       FROM stock s, purchase p 
       WHERE s.company = p.company 
       GROUP BY p.company)  AS "Profit/Lost" 
   FROM purchase p, client c, stock s 
   WHERE  s.company = p.company 
       AND c.clno = p.clno  
   GROUP BY p.company;
  </code></pre>
  
  <p>But it will display an error. How to solve?</p>