title: MySQL query to print every odd rows
body: <p>I have the following query. I just want my query to return every odd rows, i.e. row number 1,3,5... so on. At present it is returning all the rows of the above fulfilled condition.</p>
  
  <pre><code>select d.name as dept_name,count(*) as emp_number,sum(e.salary) as total_salary
  from Employee e inner join Department d on  d.id=e.department 
  group by department having count(*)&lt;6 
  order by sum(salary) desc, count(*) desc, department asc;
  </code></pre>