LeetCode - The World's Leading Online Programming Learning Platform
Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview.
leetcode.com
전체 코드
SELECT DISTINCT(viewer_id) as id
FROM Views
WHERE author_id = viewer_id
ORDER BY id
DISTINCT를 쓰면 중복이 제거된다!
'Coding Test > SQL' 카테고리의 다른 글
| [프로그래머스/SQL 고득점 Kit] SELECT ALL SOLVE (1) | 2024.01.10 |
|---|---|
| [LeetCode] 1683. Invalid Tweets (easy, SQL) (0) | 2024.01.09 |
| [LeetCode] 595. Big Countries (easy, SQL) (0) | 2024.01.09 |
| [LeetCode] 584. Find Customer Referee (easy, SQL) (0) | 2024.01.09 |
| [LeetCode] 1757. Recyclable and Low Fat Products (easy, SQL) (0) | 2024.01.09 |