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.
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(*)<6
order by sum(salary) desc, count(*) desc, department asc;