摘要:
partitionby关键字是分析性函数的一部分,它和聚合函数不同的地方在于它能返回一个分组中的多条记录,而聚合函数一般只有一条反映统计值的记录,partitionby用于给结果集分组,如果没有指定那么它把整个结果集作为一个分组create database StudentDBgouse StudentDBgocreate table Student --学生成绩表(id int, --主键Grade int, --班级Score int --分数)goinsert Student select 1,1,88union all select 2,1,66union all select 3,1
阅读全文