SQL如何進行多對多表的統計排序分頁查詢?
以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
上一篇公網動態ip怎么內網穿透
下一篇如何堅持每天寫作
SQL如何進行多對多表的統計排序分頁查詢?
以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