发现这样也可以呦,简单易懂 SELECT job, floor(( count(*) + 1 )/ 2 ) AS "start", floor(( count(*) + 2 )/ 2 ) AS 'end' FROM grade GROUP BY job ORDER BY job