当前位置:网站首页>阿里天池SQL训练营学习笔记5
阿里天池SQL训练营学习笔记5
2022-06-30 18:16:00 【游戏编程】
本笔记为阿里云天池龙珠计划SQL训练营的学习内容,链接为:https://tianchi.aliyun.com/specials/promotion/aicampsql;
窗口函数
窗口函数也称为OLAP函数。OLAP 是OnLine AnalyticalProcessing 的简称,意思是对数据库数据进行实时分析处理。
为了便于理解,称之为窗口函数。常规的SELECT语句都是对整张表进行查询,而窗口函数可以让我们有选择的去某一部分数据进行汇总、计算和排序。
窗口函数的通用形式:
<窗口函数> OVER ([PARTITION BY <列名>]
ORDER BY <排序用列名>)
[]中的内容可以省略。
窗口函数最关键的是搞明白关键字PARTITON BY 和ORDER BY *****的作用。
PARTITON BY是用来分组,即选择要看哪个窗口,类似于GROUP BY 子句的分组功能,但是PARTITION BY 子句并不具备GROUP BY 子句的汇总功能,并不会改变原始表中记录的行数。
ORDER BY是用来排序,即决定窗口内,是按那种规则(字段)来排序的。
大致来说,窗口函数可以分为两类。
一是 将SUM、MAX、MIN等聚合函数用在窗口函数中
二是 RANK、DENSE_RANK等排序用的专用窗口函数
作者:初美ChuM
游戏编程,一个游戏开发收藏夹~
如果图片长时间未显示,请使用Chrome内核浏览器。
边栏推荐
- VS 常用的快捷键指令
- js 字符串截取方法汇总
- Electron 入门
- Entropy - conditional entropy - joint entropy - mutual information - cross entropy
- 20200525-生物技术-四川师范大学自考生物技术(本科)考试计划.txt
- slice
- Unity技术手册-初探性能优化
- 20220528 [talk about fake chips] those who are greedy for cheap often suffer heavy losses. Take stock of those fake memory cards and solid state drives
- CTF流量分析常见题型(二)-USB流量
- 联想YOGA 27 2022,超强配置全面升级
猜你喜欢
![20220528 [talk about fake chips] those who are greedy for cheap often suffer heavy losses. Take stock of those fake memory cards and solid state drives](/img/96/8e195536127b90d4eec54294371cad.png)
20220528 [talk about fake chips] those who are greedy for cheap often suffer heavy losses. Take stock of those fake memory cards and solid state drives

Reading notes of "high EQ means being able to talk"

Detailed single case mode

dtd建模

20220528【聊聊假芯片】贪便宜往往吃大亏,盘点下那些假的内存卡和固态硬盘

France a+ France VOC label highest environmental protection level

TCP packet sticking problem

ANSI/UL 94 5-V级垂直燃烧试验
![Delete duplicate elements in the sorting linked list ii[unified operation of linked list nodes --dummyhead]](/img/dd/7df8f11333125290b4b30183cfff64.png)
Delete duplicate elements in the sorting linked list ii[unified operation of linked list nodes --dummyhead]

openGauss数据库源码解析系列文章—— 密态等值查询技术详解(上)
随机推荐
NBI可视化平台快速入门教程(五)编辑器功能操作介绍
期货怎么开户安全些?现在哪些期货公司靠谱些?
「干货」数据分析常用的10种统计学方法,附上重点应用场景
Evolution of screen display technology
一文详解|Go 分布式链路追踪实现原理
Word -- a solution for word to encounter errors when trying to open a file
Evolution of screen display technology
20220607跌破建议零售价,GPU市场正全面走向供过于求...
MySQL transaction concurrency and mvcc mechanism
浏览器窗口切换激活事件 visibilitychange
CTF流量分析常见题型(二)-USB流量
【DesignMode】工厂模式 (factory pattern)
NFT technology for gamefi chain game system development
torch stack() meshgrid()
Memory Limit Exceeded
Practice and Thinking on the architecture of a set of 100000 TPS im integrated message system
CTF flow analysis common questions (II) -usb flow
Personally test the size of flutter after packaging APK, quite satisfied
10 statistical methods commonly used for "dry goods" data analysis, with key application scenarios attached
ArcGIS无插件加载(无偏移)天地图