{eval=Array;=+count(Array);}
以oracle为例:
SELECT * FROM
(
SELECT A.*, ROWNUM RN
FROM (SELECT rs.student_id,count(1) FROM relationship rs group by rs.student_id order by count(1) desc) A
WHERE ROWNUM <= 10
)
WHERE RN >= 0
select student.student_name, count(relationship.course_id) from student
left join relationship on student.student_id = relationship.student_id
group by student.student_id
order by count(relationship.course_id) desc limit 0, 10;
第一页就是limit 0,10第二页就是limit 10,10
具体传入的参数自己写一个PageUtil就可以了。
0
回答0
回答0
回答0
回答0
回答0
回答0
回答0
回答0
回答0
回答