finding the maximum of all averaged results
<p>I've got a table EmployeeDetails</p>

<pre><code>DeptID   | EmpName |  workDate | percentage
------------------------------------------
dev         Sam       06/07/16   10%
dev         Smith     07/07/16   20%
HR          Denis     06/07/16   5%
HR          Danny     07/07/16   3%
IT          David     06/07/16   15%
IT          John      07/07/16   20%
</code></pre>

<p>Could you please help me to find a sql query that obtains the highest average(percentage) for each department and lowest average(percentage) for each department.</p>

<p>Thank you very much.</p>