Skip to content

Commit

Permalink
auto commit
Browse files Browse the repository at this point in the history
  • Loading branch information
CyC2018 committed May 26, 2020
1 parent e6c3bf0 commit edbe84c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/notes/Leetcode-Database 题解.md
Original file line number Diff line number Diff line change
Expand Up @@ -902,7 +902,7 @@ ORDER BY
| 3 | 4.2 | 3 | 4.2 |
| 3 | 4.2 | 2 | 4.1 |
| 1 | 4.1 | 3 | 4.2 |
| 1 | 4.1 | 2 | 4.3 |
| 1 | 4.1 | 2 | 4.2 |
| 1 | 4.1 | 1 | 4.1 |

我们想要的结果是把分数相同的放在同一个排名并且相同分数只占一个位置例如上面的分数Id=2 Id=3 的记录都有相同的分数并且最高他们并列第一 Id=1 的记录应该排第二名而不是第三名所以在进行 COUNT 计数统计时我们需要使用 COUNT( DISTINCT S2.score ) 从而只统计一次相同的分数
Expand Down
2 changes: 1 addition & 1 deletion notes/Leetcode-Database 题解.md
Original file line number Diff line number Diff line change
Expand Up @@ -902,7 +902,7 @@ ORDER BY
| 3 | 4.2 | 3 | 4.2 |
| 3 | 4.2 | 2 | 4.1 |
| 1 | 4.1 | 3 | 4.2 |
| 1 | 4.1 | 2 | 4.3 |
| 1 | 4.1 | 2 | 4.2 |
| 1 | 4.1 | 1 | 4.1 |

我们想要的结果是把分数相同的放在同一个排名并且相同分数只占一个位置例如上面的分数Id=2 Id=3 的记录都有相同的分数并且最高他们并列第一 Id=1 的记录应该排第二名而不是第三名所以在进行 COUNT 计数统计时我们需要使用 COUNT( DISTINCT S2.score ) 从而只统计一次相同的分数
Expand Down

0 comments on commit edbe84c

Please sign in to comment.