title: My sql Group By case for getting highest paid employee in specific year
body: <p>there is two table
  1 Employee
  2 salary</p>
  
  <pre><code>Employee : eId, ename, salaryId
  Salary : salaryId, eId, salary, date
  </code></pre>
  
  <p>salary table contains monthly record of employee salary,
  like: <br></p>
  
  <h2>eId date salary</h2>
  
  <pre><code>1       2015-jan-01    10000
  1       2015-feb-01    10000
  1       2015-mar-01    10000
  1       2014-jan-01    10000
  1       2014-feb-01    10000
  1       2014-mar-01    10000
  2       2015-jan-01    10000
  2       2015-feb-01    10000
  2       2015-mar-01    10000
  2       2014-jan-01    10000
  2       2014-feb-01    10000
  2       2014-mar-01    20000
  </code></pre>
  
  <p>so the query is to give me highest paid employee in specific year for ex: 2014</p>
  
  <p>so here using group by  with date and sum of salary output is :
  <br>
  empid - empname  - sum(salary)<br>
  2     - xyz     - 40000</p>