title: write PL/SQL blog statement
body: <p>suppose that we have employees table, my aim is to write declare  -blog statement which increases salary of this employees by 10%, which has   salary more than average in department where it works, and by 20% if it has not more salary,
  I think  code should be </p>
  
  <pre><code>begin
  update employees e set e.salary=e.salary+e.salary*0.1;
  where e.salary&gt;(select avg(e.salary)  from employees e group by e.department_id);
  update employees e set e.salary=e.salary+e.salary*0.1;
  where e.salary&lt;(select avg(e.salary)  from employees e group by e.department_id);
  
  
  
  end;
  </code></pre>
  
  <p>but it returns  following list of errors,</p>
  
  <pre><code>Error starting at line 4 in command:
  begin
  update employees e set e.salary=e.salary+e.salary*0.1;
  where e.salary&gt;(select avg(e.salary)  from employees e group by e.department_id);
  update employees e set e.salary=e.salary+e.salary*0.1;
  where e.salary&lt;(select avg(e.salary)  from employees e group by e.department_id);
  
  
  
  end;
  Error report:
  ORA-06550: line 3, column 1:
  PLS-00103: Encountered the symbol "WHERE" when expecting one of the following:
  
     ( begin case declare end exception exit for goto if loop mod
     null pragma raise return select update while with
     &lt;an identifier&gt; &lt;a double-quoted delimited-identifier&gt;
     &lt;a bind variable&gt; &lt;&lt; continue close current delete fetch lock
     insert open rollback savepoint set sql execute commit forall
     merge pipe purge
  06550. 00000 -  "line %s, column %s:\n%s"
  *Cause:    Usually a PL/SQL compilation error.
  *Action:
  </code></pre>
  
  <p>please help me why?, is there necessary loop statement or?</p>