我有以下查询。我只是希望我的查询返回每个奇数行,即行号1,3,5 ......等等。目前它正在返回上述满足条件的所有行。
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;