最简单的方法
考试分数(四)
http://www.nowcoder.com/questionTerminal/502fb6e2b1ad4e56aa2e0dd90c6edf3c
发现这样也可以呦,简单易懂
SELECT job, floor(( count(*) + 1 )/ 2 ) AS "start", floor(( count(*) + 2 )/ 2 ) AS 'end' FROM grade GROUP BY job ORDER BY job
考试分数(四)
http://www.nowcoder.com/questionTerminal/502fb6e2b1ad4e56aa2e0dd90c6edf3c
SELECT job, floor(( count(*) + 1 )/ 2 ) AS "start", floor(( count(*) + 2 )/ 2 ) AS 'end' FROM grade GROUP BY job ORDER BY job
相关推荐