title: How to round an average to 2 decimal places in PostgreSQL?
body: <p>I am using PostgreSQL via the Ruby gem 'sequel'.</p>
  
  <p>I'm trying to round to two decimal places.</p>
  
  <p>Here's my code:</p>
  
  <pre><code>SELECT ROUND(AVG(some_column),2)    
  FROM table
  </code></pre>
  
  <p>I get the following error: </p>
  
  <pre><code>PG::Error: ERROR:  function round(double precision, integer) does 
  not exist (Sequel::DatabaseError)
  </code></pre>
  
  <p>I get no error when I run the following code:</p>
  
  <pre><code>SELECT ROUND(AVG(some_column))
  FROM table
  </code></pre>
  
  <p>Does anyone know what I am doing wrong?</p>