题目描述:
请编写一条 SQL 查询以找出所有浏览过自己文章的作者,结果按照 id 升序排列。
查询结果的格式如下所示:
方法1:
主要思路:解题链接汇总
# Write your MySQL query statement below
select author_id as id
from Views
where author_id=viewer_id
group by author_id
order by author_id
# Write your MySQL query statement below
select distinct(author_id) as id
from Views
where author_id=viewer_id
order by author_id