文章目录 题目代码(首刷自解) 题目 Leetcode 1148. 文章浏览 I 代码(首刷自解) 这里有两个知识点: 去重用distinct,并且注意他的位置,必须放在要查询字段的开头,即放在第一个参数排序用order by,默认升序ASC,降序需要写DESC。 # Write your MySQL query statement below select distinct author_id as id from views where author_id = viewer_id order by id;