title: SQL query - SELECT in SUM
body: <p>I need SUM of results of SELECT query. When I don't use SUM, it shows me this result:</p>
  
  <pre><code>        CELKOVA_CENA
  --------------------------------------------------------------------------------
  80
  80
  120
  120
  120
  80
  150
  80
  150
  120
  150
  120
  .
  .
  .
  </code></pre>
  
  <p>But when I use SUM function, it shows me error:</p>
  
  <blockquote>
    <p>ORA-00936: missing expression</p>
  </blockquote>
  
  <p>Please, how can I fix it?</p>
  
  <pre><code>SELECT SUM (
     SELECT n.hodnota 
     FROM evidn_nastaveni n
     WHERE n.popis = 'cena_krakorce'
     AND
     n.upresneni = k.pozice) 
     AS celkova_cena
  FROM (
    SELECT oc.clen, oc.oddil
    FROM evidn_oddily_clenove oc 
    INNER JOIN evidn_oddily o ON oc.oddil = o.id
    WHERE o.nazev = 'Slalom')
  NATURAL JOIN evidn_krakorce k;
  </code></pre>
  
  <p>Thanks for responses</p>