From c52b15aad0f4797529330f3361f7fe7b65ec3c1f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=97=AB=E7=BB=A7=E5=91=A8?= Date: Tue, 24 Oct 2023 21:26:23 +0800 Subject: [PATCH] =?UTF-8?q?20231017=E7=AC=94=E8=AE=B0=E8=A1=A5=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../20231017\347\254\224\350\256\260.md" | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 "33\351\227\253\347\273\247\345\221\250/20231017\347\254\224\350\256\260.md" diff --git "a/33\351\227\253\347\273\247\345\221\250/20231017\347\254\224\350\256\260.md" "b/33\351\227\253\347\273\247\345\221\250/20231017\347\254\224\350\256\260.md" new file mode 100644 index 0000000..268b663 --- /dev/null +++ "b/33\351\227\253\347\273\247\345\221\250/20231017\347\254\224\350\256\260.md" @@ -0,0 +1,20 @@ +# 笔记 + +##### timestampdiff(单位,a,b); (b-a)时间戳 + + 单位:年差year、月差month、天数day、时差hour、分minute、秒second、毫秒microsecond + +### 窗口大小 + +```mysql + -- 开窗范围 + over(partition by 字段 rows between unbounded/preceding and current row) + + rows:启用窗口大小 + between...and... :区间范围 + n unbounded: 后n行 + n preceding: 前n行 + current row: 当前行 + n following: 指当前行之后的行 -- 1 following (当前行+后一行) + unbounded following: 最终行 +``` \ No newline at end of file -- Gitee