https://leetcode.com/problems/article-views-i/
select distinct a.author_id as id
from Views as a
where a.author_id = a.viewer_id
order by id
best
SELECT AUTHOR_ID AS ID
FROM VIEWS
WHERE AUTHOR_ID=VIEWER_ID
GROUP BY ID
ORDER BY ID;
728x90
반응형
'자료구조 알고리즘 > 코딩테스트' 카테고리의 다른 글
607. Sales Person (0) | 2022.06.03 |
---|---|
197. Rising Temperature (0) | 2022.06.03 |
1581. Customer Who Visited but Did Not Make Any Transactions (0) | 2022.06.03 |
746. Min Cost Climbing Stairs (0) | 2022.05.31 |
70. Climbing Stairs (0) | 2022.05.31 |