{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
回答