title: How to filter on aggregation value in Athena (Presto)?
body: <p>I can't run a simple sql select with where condition from Athena console. Below is the details:</p>
  
  <pre><code>SELECT name, count(*) AS c
  FROM target_reddit_movie
  GROUP BY name
  HAVING c &gt; 1
  ORDER BY c DESC
  LIMIT 10
  </code></pre>
  
  <p>I got an error <code>SYNTAX_ERROR: line 1:74: Column 'c' cannot be resolved</code>.</p>
  
  <p>It looks like Athena doesn't recognise the <code>as</code> column name. How can I make it work? Does it use a different syntax?</p>