From 1bcce85bee2fafa84a370852fa7fc9bfcc234785 Mon Sep 17 00:00:00 2001 From: lzlk <1930069369@qq.com> Date: Wed, 21 Sep 2022 19:52:25 +0800 Subject: [PATCH 1/5] =?UTF-8?q?=E7=AC=AC=E5=9B=9B=E6=AC=A1=E4=BD=9C?= =?UTF-8?q?=E4=B8=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../2022-9-21\344\275\234\344\270\232.sql" | 50 +++++++++++++++++++ .../2022-9-21\347\254\224\350\256\260.md" | 26 ++++++++++ 2 files changed, 76 insertions(+) create mode 100644 "7 \345\273\226\346\262\273\345\205\210/\344\275\234\344\270\232/2022-9-21\344\275\234\344\270\232.sql" create mode 100644 "7 \345\273\226\346\262\273\345\205\210/\347\254\224\350\256\260/2022-9-21\347\254\224\350\256\260.md" diff --git "a/7 \345\273\226\346\262\273\345\205\210/\344\275\234\344\270\232/2022-9-21\344\275\234\344\270\232.sql" "b/7 \345\273\226\346\262\273\345\205\210/\344\275\234\344\270\232/2022-9-21\344\275\234\344\270\232.sql" new file mode 100644 index 0000000..23553bf --- /dev/null +++ "b/7 \345\273\226\346\262\273\345\205\210/\344\275\234\344\270\232/2022-9-21\344\275\234\344\270\232.sql" @@ -0,0 +1,50 @@ +--13. 按平均成绩从高到低显示所有学生的所有课程的成绩以及平均成绩 + select sc.sid,max(case when cid=01 then score end)'01', + max(case when cid=02 then score end)'02', + max(case when cid=03 then score end)'03', + avg(score)平均成绩 + from sc + group by sid + order by AVG(score) desc +--14. 查询各科成绩最高分、最低分和平均分: + +--以如下形式显示:课程 ID,课程 name,最高分,最低分,平均分,及格率,中等率,优良率,优秀率 + +--及格为>=60,中等为:70-80,优良为:80-90,优秀为:>=90 + +--要求输出课程号和选修人数,查询结果按人数降序排列,若人数相同,按课程号升序排列 + select cid,count(*)选修人数, + (select MAX(score) from sc sc1 where sc1.CId=sc.CId )最高分, + (select min(score) from sc sc1 where sc1.CId=sc.CId )最低分, + (select avg(score) from sc sc1 where sc1.CId=sc.CId )平均分, + (select cname from Course c where c.CId=sc.CId)学科, + concat(count((case when score>=60 then '及格' end))*100/count(*),'%')及格, + concat(count((case when score>=70 and score<80 then '中等' end))*100/count(*),'%')中等, + concat(count((case when score>=80 and score<90 then '优良' end))*100/count(*),'%')优良, + concat(count((case when score>=90 then '优秀' end))*100/count(*),'%')优秀 + from sc + group by cid + order by count(*),cid + ; +--15. 按各科成绩进行排序,并显示排名, Score 重复时保留名次空缺 + select *,RANK() over(partition by cid order by score desc) from sc; +--15.1 按各科成绩进行排序,并显示排名, Score 重复时合并名次 + select *,DENSE_RANK() over(partition by cid order by score desc) from sc; +--16. 查询学生的总成绩,并进行排名,总分重复时保留名次空缺 + select sid,sum(score),RANK() over(order by sum(score)desc) from sc + group by sid + ; +--16.1 查询学生的总成绩,并进行排名,总分重复时不保留名次空缺 + select sid,sum(score),DENSE_RANK() over(order by sum(score)desc) from sc + group by sid + ; +--17. 统计各科成绩各分数段人数:课程编号,课程名称,[100-85],[85-70],[70-60],[60-0] 及所占百分比 + select cid, + (select cname from Course c where c.CId=sc.CId)学科, + concat(count((case when score>=60 then '及格' end))*100/count(*),'%')[100-85], + concat(count((case when score>=70 and score<80 then '中等' end))*100/count(*),'%')[85-70], + concat(count((case when score>=80 and score<90 then '优良' end))*100/count(*),'%')[70-60], + concat(count((case when score>=90 then '优秀' end))*100/count(*),'%')[60-0] + from sc + group by sc.cid + order by count(*),sc.cid; \ No newline at end of file diff --git "a/7 \345\273\226\346\262\273\345\205\210/\347\254\224\350\256\260/2022-9-21\347\254\224\350\256\260.md" "b/7 \345\273\226\346\262\273\345\205\210/\347\254\224\350\256\260/2022-9-21\347\254\224\350\256\260.md" new file mode 100644 index 0000000..6be4ef1 --- /dev/null +++ "b/7 \345\273\226\346\262\273\345\205\210/\347\254\224\350\256\260/2022-9-21\347\254\224\350\256\260.md" @@ -0,0 +1,26 @@ +select * from tb_student + +--鏌ヨ骞撮緞鏈澶х殑瀛︾敓淇℃伅锛岃姹傛樉绀猴細濮撳悕锛屾у埆锛屽勾榫 +select birth,name 濮撳悕,gender 鎬у埆 from tb_student +where birth = (select min(birth) from tb_student) + +--鎺掑簭鍑芥暟 +select birth,濮撳悕,鎬у埆 from ( +select birth,name 濮撳悕,gender 鎬у埆,row_number() over (order by birth ) as birth_rank from tb_student +) as T1 +where T1.birth_rank = 1 + +--鏌ヨ鐢风敓鍜屽コ鐢熶腑骞撮緞鏈澶х殑瀛︾敓淇℃伅锛岃姹傛樉绀猴細濮撳悕锛屾у埆锛屽勾榫 +--闈炲叧鑱斿瓙鏌ヨ +select birth,name 濮撳悕,gender 鎬у埆 from tb_student +where birth in (select min(birth) from tb_student group by gender) + +--鍏宠仈瀛愭煡璇細鍐呴儴鏌ヨ闇瑕佸紩鐢ㄥ閮ㄨ〃宸叉煡璇㈠嚭鐨勪俊鎭 +select birth,name 濮撳悕,gender 鎬у埆 from tb_student t1 +where birth = (select min(birth) from tb_student t2 where t2.gender=t1.gender) + +--绐楀彛鍑芥暟锛氭帓搴 +select birth,濮撳悕,鎬у埆 from ( +select birth,name 濮撳悕,gender 鎬у埆,row_number() over (partition by gender order by birth ) as birth_rank from tb_student +) as T1 +where T1.birth_rank = 1 -- Gitee From ac1e4013cffc4625fc58554c38c327708f31798e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BB=96=E6=B2=BB=E5=85=88?= <1930069369@qq.com> Date: Wed, 21 Sep 2022 15:59:13 +0000 Subject: [PATCH 2/5] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=96=87=E4=BB=B6=207=20?= =?UTF-8?q?=E5=BB=96=E6=B2=BB=E5=85=88/=E4=BD=9C=E4=B8=9A/2022-9-21?= =?UTF-8?q?=E4=BD=9C=E4=B8=9A.sql?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../2022-9-21\344\275\234\344\270\232.sql" | 50 ------------------- 1 file changed, 50 deletions(-) delete mode 100644 "7 \345\273\226\346\262\273\345\205\210/\344\275\234\344\270\232/2022-9-21\344\275\234\344\270\232.sql" diff --git "a/7 \345\273\226\346\262\273\345\205\210/\344\275\234\344\270\232/2022-9-21\344\275\234\344\270\232.sql" "b/7 \345\273\226\346\262\273\345\205\210/\344\275\234\344\270\232/2022-9-21\344\275\234\344\270\232.sql" deleted file mode 100644 index 23553bf..0000000 --- "a/7 \345\273\226\346\262\273\345\205\210/\344\275\234\344\270\232/2022-9-21\344\275\234\344\270\232.sql" +++ /dev/null @@ -1,50 +0,0 @@ ---13. 按平均成绩从高到低显示所有学生的所有课程的成绩以及平均成绩 - select sc.sid,max(case when cid=01 then score end)'01', - max(case when cid=02 then score end)'02', - max(case when cid=03 then score end)'03', - avg(score)平均成绩 - from sc - group by sid - order by AVG(score) desc ---14. 查询各科成绩最高分、最低分和平均分: - ---以如下形式显示:课程 ID,课程 name,最高分,最低分,平均分,及格率,中等率,优良率,优秀率 - ---及格为>=60,中等为:70-80,优良为:80-90,优秀为:>=90 - ---要求输出课程号和选修人数,查询结果按人数降序排列,若人数相同,按课程号升序排列 - select cid,count(*)选修人数, - (select MAX(score) from sc sc1 where sc1.CId=sc.CId )最高分, - (select min(score) from sc sc1 where sc1.CId=sc.CId )最低分, - (select avg(score) from sc sc1 where sc1.CId=sc.CId )平均分, - (select cname from Course c where c.CId=sc.CId)学科, - concat(count((case when score>=60 then '及格' end))*100/count(*),'%')及格, - concat(count((case when score>=70 and score<80 then '中等' end))*100/count(*),'%')中等, - concat(count((case when score>=80 and score<90 then '优良' end))*100/count(*),'%')优良, - concat(count((case when score>=90 then '优秀' end))*100/count(*),'%')优秀 - from sc - group by cid - order by count(*),cid - ; ---15. 按各科成绩进行排序,并显示排名, Score 重复时保留名次空缺 - select *,RANK() over(partition by cid order by score desc) from sc; ---15.1 按各科成绩进行排序,并显示排名, Score 重复时合并名次 - select *,DENSE_RANK() over(partition by cid order by score desc) from sc; ---16. 查询学生的总成绩,并进行排名,总分重复时保留名次空缺 - select sid,sum(score),RANK() over(order by sum(score)desc) from sc - group by sid - ; ---16.1 查询学生的总成绩,并进行排名,总分重复时不保留名次空缺 - select sid,sum(score),DENSE_RANK() over(order by sum(score)desc) from sc - group by sid - ; ---17. 统计各科成绩各分数段人数:课程编号,课程名称,[100-85],[85-70],[70-60],[60-0] 及所占百分比 - select cid, - (select cname from Course c where c.CId=sc.CId)学科, - concat(count((case when score>=60 then '及格' end))*100/count(*),'%')[100-85], - concat(count((case when score>=70 and score<80 then '中等' end))*100/count(*),'%')[85-70], - concat(count((case when score>=80 and score<90 then '优良' end))*100/count(*),'%')[70-60], - concat(count((case when score>=90 then '优秀' end))*100/count(*),'%')[60-0] - from sc - group by sc.cid - order by count(*),sc.cid; \ No newline at end of file -- Gitee From 425d65b345836e02ad7c2c6f348ed8373019d5cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BB=96=E6=B2=BB=E5=85=88?= <1930069369@qq.com> Date: Wed, 21 Sep 2022 15:59:50 +0000 Subject: [PATCH 3/5] =?UTF-8?q?=E7=AC=AC=E5=9B=9B=E6=AC=A1=E4=BD=9C?= =?UTF-8?q?=E4=B8=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 寤栨不鍏 <1930069369@qq.com> --- .../2022-9-21\344\275\234\344\270\232.sql" | 60 +++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 "7 \345\273\226\346\262\273\345\205\210/\344\275\234\344\270\232/2022-9-21\344\275\234\344\270\232.sql" diff --git "a/7 \345\273\226\346\262\273\345\205\210/\344\275\234\344\270\232/2022-9-21\344\275\234\344\270\232.sql" "b/7 \345\273\226\346\262\273\345\205\210/\344\275\234\344\270\232/2022-9-21\344\275\234\344\270\232.sql" new file mode 100644 index 0000000..493550b --- /dev/null +++ "b/7 \345\273\226\346\262\273\345\205\210/\344\275\234\344\270\232/2022-9-21\344\275\234\344\270\232.sql" @@ -0,0 +1,60 @@ +--13. 按平均成绩从高到低显示所有学生的所有课程的成绩以及平均成绩 + --1. + select sc.sid,max(case when cid=01 then score end)'01', + max(case when cid=02 then score end)'02', + max(case when cid=03 then score end)'03', + avg(score)平均成绩 + from sc + group by sid + order by AVG(score) desc + ; + --2. + select sid,(select sid from sc sc1 where sc1.CId=01 and sc1.sid=sc.sid )'01', + (select score from sc sc1 where sc1.CId=02 and sc1.sid=sc.sid )'02', + (select score from sc sc1 where sc1.CId=03 and sc1.sid=sc.sid )'03', + avg(score)平均成绩 + from sc + group by sid + order by AVG(score) desc; +--14. 查询各科成绩最高分、最低分和平均分: + +--以如下形式显示:课程 ID,课程 name,最高分,最低分,平均分,及格率,中等率,优良率,优秀率 + +--及格为>=60,中等为:70-80,优良为:80-90,优秀为:>=90 + +--要求输出课程号和选修人数,查询结果按人数降序排列,若人数相同,按课程号升序排列 + select cid,count(*)选修人数, + (select MAX(score) from sc sc1 where sc1.CId=sc.CId )最高分, + (select min(score) from sc sc1 where sc1.CId=sc.CId )最低分, + (select avg(score) from sc sc1 where sc1.CId=sc.CId )平均分, + (select cname from Course c where c.CId=sc.CId)学科, + concat(count((case when score>=60 then '及格' end))*100/count(*),'%')及格, + concat(count((case when score>=70 and score<80 then '中等' end))*100/count(*),'%')中等, + concat(count((case when score>=80 and score<90 then '优良' end))*100/count(*),'%')优良, + concat(count((case when score>=90 then '优秀' end))*100/count(*),'%')优秀 + from sc + group by cid + order by count(*),cid + ; +--15. 按各科成绩进行排序,并显示排名, Score 重复时保留名次空缺 + select *,RANK() over(partition by cid order by score desc) from sc; +--15.1 按各科成绩进行排序,并显示排名, Score 重复时合并名次 + select *,DENSE_RANK() over(partition by cid order by score desc) from sc; +--16. 查询学生的总成绩,并进行排名,总分重复时保留名次空缺 + select sid,sum(score),RANK() over(order by sum(score)desc) from sc + group by sid + ; +--16.1 查询学生的总成绩,并进行排名,总分重复时不保留名次空缺 + select sid,sum(score),DENSE_RANK() over(order by sum(score)desc) from sc + group by sid + ; +--17. 统计各科成绩各分数段人数:课程编号,课程名称,[100-85],[85-70],[70-60],[60-0] 及所占百分比 + select cid, + (select cname from Course c where c.CId=sc.CId)学科, + concat(count((case when score>=60 then '及格' end))*100/count(*),'%')[100-85], + concat(count((case when score>=70 and score<80 then '中等' end))*100/count(*),'%')[85-70], + concat(count((case when score>=80 and score<90 then '优良' end))*100/count(*),'%')[70-60], + concat(count((case when score>=90 then '优秀' end))*100/count(*),'%')[60-0] + from sc + group by sc.cid + order by count(*),sc.cid; \ No newline at end of file -- Gitee From e3c89d81ba5db228f5b20cce7ab9eb766257613a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BB=96=E6=B2=BB=E5=85=88?= <1930069369@qq.com> Date: Thu, 22 Sep 2022 03:17:47 +0000 Subject: [PATCH 4/5] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=96=87=E4=BB=B6=207=20?= =?UTF-8?q?=E5=BB=96=E6=B2=BB=E5=85=88/=E4=BD=9C=E4=B8=9A/2022-9-21?= =?UTF-8?q?=E4=BD=9C=E4=B8=9A.sql?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../2022-9-21\344\275\234\344\270\232.sql" | 60 ------------------- 1 file changed, 60 deletions(-) delete mode 100644 "7 \345\273\226\346\262\273\345\205\210/\344\275\234\344\270\232/2022-9-21\344\275\234\344\270\232.sql" diff --git "a/7 \345\273\226\346\262\273\345\205\210/\344\275\234\344\270\232/2022-9-21\344\275\234\344\270\232.sql" "b/7 \345\273\226\346\262\273\345\205\210/\344\275\234\344\270\232/2022-9-21\344\275\234\344\270\232.sql" deleted file mode 100644 index 493550b..0000000 --- "a/7 \345\273\226\346\262\273\345\205\210/\344\275\234\344\270\232/2022-9-21\344\275\234\344\270\232.sql" +++ /dev/null @@ -1,60 +0,0 @@ ---13. 按平均成绩从高到低显示所有学生的所有课程的成绩以及平均成绩 - --1. - select sc.sid,max(case when cid=01 then score end)'01', - max(case when cid=02 then score end)'02', - max(case when cid=03 then score end)'03', - avg(score)平均成绩 - from sc - group by sid - order by AVG(score) desc - ; - --2. - select sid,(select sid from sc sc1 where sc1.CId=01 and sc1.sid=sc.sid )'01', - (select score from sc sc1 where sc1.CId=02 and sc1.sid=sc.sid )'02', - (select score from sc sc1 where sc1.CId=03 and sc1.sid=sc.sid )'03', - avg(score)平均成绩 - from sc - group by sid - order by AVG(score) desc; ---14. 查询各科成绩最高分、最低分和平均分: - ---以如下形式显示:课程 ID,课程 name,最高分,最低分,平均分,及格率,中等率,优良率,优秀率 - ---及格为>=60,中等为:70-80,优良为:80-90,优秀为:>=90 - ---要求输出课程号和选修人数,查询结果按人数降序排列,若人数相同,按课程号升序排列 - select cid,count(*)选修人数, - (select MAX(score) from sc sc1 where sc1.CId=sc.CId )最高分, - (select min(score) from sc sc1 where sc1.CId=sc.CId )最低分, - (select avg(score) from sc sc1 where sc1.CId=sc.CId )平均分, - (select cname from Course c where c.CId=sc.CId)学科, - concat(count((case when score>=60 then '及格' end))*100/count(*),'%')及格, - concat(count((case when score>=70 and score<80 then '中等' end))*100/count(*),'%')中等, - concat(count((case when score>=80 and score<90 then '优良' end))*100/count(*),'%')优良, - concat(count((case when score>=90 then '优秀' end))*100/count(*),'%')优秀 - from sc - group by cid - order by count(*),cid - ; ---15. 按各科成绩进行排序,并显示排名, Score 重复时保留名次空缺 - select *,RANK() over(partition by cid order by score desc) from sc; ---15.1 按各科成绩进行排序,并显示排名, Score 重复时合并名次 - select *,DENSE_RANK() over(partition by cid order by score desc) from sc; ---16. 查询学生的总成绩,并进行排名,总分重复时保留名次空缺 - select sid,sum(score),RANK() over(order by sum(score)desc) from sc - group by sid - ; ---16.1 查询学生的总成绩,并进行排名,总分重复时不保留名次空缺 - select sid,sum(score),DENSE_RANK() over(order by sum(score)desc) from sc - group by sid - ; ---17. 统计各科成绩各分数段人数:课程编号,课程名称,[100-85],[85-70],[70-60],[60-0] 及所占百分比 - select cid, - (select cname from Course c where c.CId=sc.CId)学科, - concat(count((case when score>=60 then '及格' end))*100/count(*),'%')[100-85], - concat(count((case when score>=70 and score<80 then '中等' end))*100/count(*),'%')[85-70], - concat(count((case when score>=80 and score<90 then '优良' end))*100/count(*),'%')[70-60], - concat(count((case when score>=90 then '优秀' end))*100/count(*),'%')[60-0] - from sc - group by sc.cid - order by count(*),sc.cid; \ No newline at end of file -- Gitee From 88b5b0f926aae0beef6b94f61647b8726b4460c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BB=96=E6=B2=BB=E5=85=88?= <1930069369@qq.com> Date: Thu, 22 Sep 2022 03:18:08 +0000 Subject: [PATCH 5/5] =?UTF-8?q?=E7=AC=AC=E5=9B=9B=E6=AC=A1=E4=BD=9C?= =?UTF-8?q?=E4=B8=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 寤栨不鍏 <1930069369@qq.com> --- .../2022-9-21\344\275\234\344\270\232.sql" | 57 +++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 "7 \345\273\226\346\262\273\345\205\210/\344\275\234\344\270\232/2022-9-21\344\275\234\344\270\232.sql" diff --git "a/7 \345\273\226\346\262\273\345\205\210/\344\275\234\344\270\232/2022-9-21\344\275\234\344\270\232.sql" "b/7 \345\273\226\346\262\273\345\205\210/\344\275\234\344\270\232/2022-9-21\344\275\234\344\270\232.sql" new file mode 100644 index 0000000..ab5e3c6 --- /dev/null +++ "b/7 \345\273\226\346\262\273\345\205\210/\344\275\234\344\270\232/2022-9-21\344\275\234\344\270\232.sql" @@ -0,0 +1,57 @@ +--13. 按平均成绩从高到低显示所有学生的所有课程的成绩以及平均成绩 + --1. + select sc.sid,max(case when cid=01 then score end)'01', + max(case when cid=02 then score end)'02', + max(case when cid=03 then score end)'03', + avg(score)平均成绩 + from sc + group by sid + order by AVG(score) desc + ; + --2. + select sid,(select sid from sc sc1 where sc1.CId=01 and sc1.sid=sc.sid )'01', + (select score from sc sc1 where sc1.CId=02 and sc1.sid=sc.sid )'02', + (select score from sc sc1 where sc1.CId=03 and sc1.sid=sc.sid )'03', + avg(score)平均成绩 + from sc + group by sid + order by AVG(score) desc; +--14. 查询各科成绩最高分、最低分和平均分: + +--以如下形式显示:课程 ID,课程 name,最高分,最低分,平均分,及格率,中等率,优良率,优秀率 + +--及格为>=60,中等为:70-80,优良为:80-90,优秀为:>=90 + +--要求输出课程号和选修人数,查询结果按人数降序排列,若人数相同,按课程号升序排列 + select cid,count(*)选修人数,max(score)最高分,min(score)最低分,avg(score)平均分, + (select cname from Course c where c.CId=sc.CId)学科, + concat(count((case when score>=60 then '及格' end))*100/count(*),'%')及格, + concat(count((case when score>=70 and score<80 then '中等' end))*100/count(*),'%')中等, + concat(count((case when score>=80 and score<90 then '优良' end))*100/count(*),'%')优良, + concat(count((case when score>=90 then '优秀' end))*100/count(*),'%')优秀 + from sc + group by cid + order by count(*),cid + ; +--15. 按各科成绩进行排序,并显示排名, Score 重复时保留名次空缺 + select *,RANK() over(partition by cid order by score desc) from sc; +--15.1 按各科成绩进行排序,并显示排名, Score 重复时合并名次 + select *,DENSE_RANK() over(partition by cid order by score desc) from sc; +--16. 查询学生的总成绩,并进行排名,总分重复时保留名次空缺 + select sid,sum(score),RANK() over(order by sum(score)desc) from sc + group by sid + ; +--16.1 查询学生的总成绩,并进行排名,总分重复时不保留名次空缺 + select sid,sum(score),DENSE_RANK() over(order by sum(score)desc) from sc + group by sid + ; +--17. 统计各科成绩各分数段人数:课程编号,课程名称,[100-85],[85-70],[70-60],[60-0] 及所占百分比 + select cid, + (select cname from Course c where c.CId=sc.CId)学科, + concat(count((case when score>=60 then '及格' end))*100/count(*),'%')[100-85], + concat(count((case when score>=70 and score<80 then '中等' end))*100/count(*),'%')[85-70], + concat(count((case when score>=80 and score<90 then '优良' end))*100/count(*),'%')[70-60], + concat(count((case when score>=90 then '优秀' end))*100/count(*),'%')[60-0] + from sc + group by sc.cid + order by count(*),sc.cid; \ No newline at end of file -- Gitee