본문 바로가기
기술스택을 쌓아보자/SQL

[LEETCODE- SQL 50] 20240713푼 문제들!

by 소리331 2024. 7. 13.
반응형

시작 시간 : 8시 34분 

종료 시간 : 

 

문제 유형 :select 

1. 단순 where 문으로 일치하는 값을 찾는 단순 select 문 

2. SQL에서 NULL 값에 대한 처리 

SELECT name from Customer where referee_id != 2 OR referee_id IS NULL;

3. or 구문을 통한 단순 필터링

4. where 절의 결과 값에서 distinct 값을 뽑아내는 select 문 

select distinct author_id as id from Views where viewer_id=author_id order by id;

5. varchar 칼럼의 데이터 길이를 축정하는 length문을 이용한 select문

select tweet_id from Tweets where LENGTH(content) > 15;
반응형

댓글