title: syntax error encountered in Window function implementation in mysql
body: <p>I am trying to execute the following implementation of window function</p>
  
  <pre><code>SELECT employee_no, employee_name, department_no, 
         round(avg(salary) OVER(PARTITION BY e.department_no),2) AS dept_avg_salary, 
         salary as salary_of_employee 
  FROM employee e 
  WHERE e.department_no is not null and salary &gt; (select avg(salary) 
                  from employee e2 
                  where e2.department_no = e.department_no 
                  groupby e2.department_no
                 );
  </code></pre>
  
  <blockquote>
    <p>Error 1064 encountered. </p>
  </blockquote>
  
  <p><strong>Please help</strong>!</p>