1, data preparation
CREATE TABLE [StudentScores]
(
[UserName] NVARCHAR(20), --
[Subject] NVARCHAR(30), --
[Score] FLOAT, --
)
INSERT INTO [StudentScores] SELECT "", "", 80
INSERT INTO [StudentScores] SELECT "", "", 90
INSERT INTO [StudentScores] SELECT "", "", 70
INSERT INTO [StudentScores] SELECT "", "", 85
INSERT INTO [StudentScores] SELECT "", "", 80
INSERT INTO [StudentScores] SELECT "", "", 92
INSERT INTO [StudentScores] SELECT "", "", 76
INSERT INTO [StudentScores] SELECT "", "", 88
INSERT INTO [StudentScores] SELECT "", "", 60
INSERT INTO [StudentScores] SELECT "", "", 82
INSERT INTO [StudentScores] SELECT "", "", 96
INSERT INTO [StudentScores] SELECT "", "", 78
query result:
sql
:
: