개인활동/코테

[LeetCode/MySQL50] 1148. Article Views I

려우 2025. 1. 12. 15:33
반응형

Problem

Solution

# Write your MySQL query statement below
select distinct author_id id from Views
where author_id = viewer_id 
order by id ASC;

 

MySQL Select문 중복 제거 : DISTINCT

MySQL Select문 컬럼 명 재명명 : SELECT real_column_name (AS) change_name ...

 

정렬

ASC : 오름차순

DESC : 내림차순

반응형