title: Error: argument of HAVING must be type boolean, not type double precision
body: <p>I'm trying to execute this query in PostgreSQL</p>
  
  <pre><code>  SELECT sum(No_of_Items) AS Total,
           Name FROM All_Bills_of_POS
  GROUP BY Name
    HAVING MAX(Total)
  ORDER BY Total DESC LIMIT 1";
  </code></pre>
  
  <p>But I'm getting this error:</p>
  
  <blockquote>
    <p>org.postgresql.util.PSQLException: ERROR: argument of HAVING must be type boolean, not type double precision</p>
  </blockquote>
  
  <p>But this query works fine in SQLite. How to execute it in PostgreSQL?</p>