title: Cast syntax to convert a sum to float
body: <p>Using PostgreSQL 9.3, I want to convert the calculated values to data type <code>float</code>.</p>
  
  <p>My first attempt:</p>
  
  <pre><code>SELECT float(SUM(Seconds))/-1323 AS Averag;
  </code></pre>
  
  <p>Gives me this error:</p>
  
  <blockquote>
  <pre><code>syntax error at or near "SUM"
  </code></pre>
  </blockquote>
  
  <p>My second attempt:</p>
  
  <pre><code>SELECT to_float(SUM(Seconds))/-1323 AS Averag;
  </code></pre>
  
  <p>Gives me this error:</p>
  
  <blockquote>
  <pre><code> function to_float(bigint) does not exist
  </code></pre>
  </blockquote>