W3Cschool
恭喜您成為首批注冊用戶
獲得88經(jīng)驗值獎勵
v1.17提供
不涉及跨數(shù)據(jù)庫的情況(即單表與全局表),Mycat的窗口函數(shù)使用方式與MySQL完全一致.
在涉及跨數(shù)據(jù)庫的情況下,MycatWindow
不能下推變成SQL,所以在Mycat2內(nèi)進行計算匯總結(jié)果.
function OVER ([[partition by column1] [order by column2] [RANGE|ROWS BETWEEN start AND end]])
function OVER partition by column1 order by column2 RANGE BETWEEN start AND end
function OVER partition by column1 order by column2 ROWS BETWEEN start AND end
COUNT(value [, value ]*) OVER
COUNT(*) OVER
AVG(numeric) OVER
SUM(numeric) OVER
MAX(value) OVER
MIN(value) OVER
RANK() OVER
DENSE_RANK() OVER
ROW_NUMBER() OVER
FIRST_VALUE(value) OVER
LAST_VALUE(value) OVER
LEAD(value, offset, default) OVER
LAG(value, offset, default) OVER
NTILE(value) OVER
具體語義參考 https://dev.mysql.com/doc/refman/8.0/en/window-function-descriptions.html
Copyright©2021 w3cschool編程獅|閩ICP備15016281號-3|閩公網(wǎng)安備35020302033924號
違法和不良信息舉報電話:173-0602-2364|舉報郵箱:jubao@eeedong.com
掃描二維碼
下載編程獅App
編程獅公眾號
聯(lián)系方式:
更多建議: