title: Is it allowed to use over() in the having clause?
body: <p>I need to use  <code>over(partition by ...)</code> in the <code>having</code> clause.</p>
  
  <p>This is my code which gives the error:</p>
  
  <blockquote>
    <p>group function is nested too deeply</p>
  </blockquote>
  
  <pre><code>select resort, discipline, gender, count(1)
  from races
  group by resort, discipline, gender
  having sum(count(1)) over (partition by resort, discipline) &gt; 10;
  </code></pre>
  
  <p>Is there a way to use <code>over()</code> in the <code>having</code> clause or is there an alternative?</p>