1
0
mirror of https://gitee.com/coder-xiaomo/leetcode-problemset synced 2025-09-11 18:31:41 +08:00
Code Issues Projects Releases Wiki Activity GitHub Gitee

存量题库数据更新

This commit is contained in:
2023-12-09 18:42:21 +08:00
parent a788808cd7
commit c198538f10
10843 changed files with 288489 additions and 248355 deletions

View File

@@ -9,18 +9,25 @@
| viewer_id | int |
| view_date | date |
+---------------+---------+
此表无主键,因此可能会存在重复行。
此表可能会存在重复行。(换句话说,在 SQL 中这个表没有主键)
此表的每一行都表示某人在某天浏览了某位作者的某篇文章。
请注意,同一人的 author_id 和 viewer_id 是相同的。
</pre>
<p>&nbsp;</p>
<p>编写一条 SQL 查询以找出所有浏览过自己文章的作者,结果按照 id 升序排列。</p>
<p>查询出所有浏览过自己文章的作者</p>
<p>结果按照 <code>id</code> 升序排列。</p>
<p>查询结果的格式如下所示:</p>
<p>&nbsp;</p>
<p><strong>示例 1</strong></p>
<pre>
<strong>输入:</strong>
Views 表:
+------------+-----------+-----------+------------+
| article_id | author_id | viewer_id | view_date |
@@ -34,7 +41,7 @@ Views 表:
| 3 | 4 | 4 | 2019-07-21 |
+------------+-----------+-----------+------------+
结果表:
<strong>输出:</strong>
+------+
| id |
+------+