题目来源:
leetcode题目,网址:1148. 文章浏览 I - 力扣(LeetCode)
解题思路:
筛选后去重并排序即可。
解题代码:
# Write your MySQL query statement below
select distinct author_id as id
from Views
where author_id=viewer_id
order by author_id
总结:
和官方题解代码一样,但运行时间只超过50%。
题目来源:
leetcode题目,网址:1148. 文章浏览 I - 力扣(LeetCode)
解题思路:
筛选后去重并排序即可。
解题代码:
# Write your MySQL query statement below
select distinct author_id as id
from Views
where author_id=viewer_id
order by author_id
总结:
和官方题解代码一样,但运行时间只超过50%。