일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | ||||
4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |
- 서평
- 성적프로그램
- 필기
- sqldeveloper
- 미니프로젝트
- 뇌정리
- algorithms
- 주간회고
- 알고리즘
- Python
- 2020년 정보처리기사 4회
- 회고
- jsp
- 함수형 코딩
- 2020년 일정
- Jackson
- 항해99
- LeetCode
- Real MySQL
- 책리뷰
- Til
- 정보처리기사
- git
- 스터디
- java
- post
- hackerrank
- If
- 코드숨
- 2020년 제4회 정보처리기사 필기 문제 분석
- Today
- Total
목록LeetCode/SQL (3)
조컴퓨터

1) SELF JOIN 1-1) SELECT * FROM Weather w1, Weather w2 WHERE DATE_ADD(w1.recordDate, INTERVAL 1 DAY) = w2.recordDate AND w1.Temperature < w2.Temperature 1-1) 결과 {"headers": ["Id", "RecordDate", "Temperature", "Id", "RecordDate", "Temperature"], "values": [[1, "2015-01-01", 10, 2, "2015-01-02", 25], [3, "2015-01-03", 20, 4, "2015-01-04", 30]]} 2) w2.Id 2-1) SELECT w2.Id AS Id FROM Weather w1, Wea..

1) SELF JOIN 1-1) SELECT * FROM Employee e1, Employee e2 WHERE e1.Id = e2.ManagerId 1-1) 결과 {"headers": ["Id", "Name", "Salary", "ManagerId", "Id", "Name", "Salary", "ManagerId"], "values": [[3, "Sam", 60000, null, 1, "Joe", 70000, 3], [4, "Max", 90000, null, 2, "Henry", 80000, 4]]} 2) e1.Salary(매니저 급여) < e2.Salary(직원 급여) SELECT * FROM Employee e1, Employee e2 WHERE e1.Id = e2.ManagerId AND e1.S..

1) CASE WHEN 1-1) SELECT id , CASE WHEN month = "Jan" THEN revenue ELSE NULL END AS Jan_Revenue , CASE WHEN month = "Feb" THEN revenue ELSE NULL END AS Feb_Revenue , CASE WHEN month = "Mar" THEN revenue ELSE NULL END AS Mar_Revenue , CASE WHEN month = "Apr" THEN revenue ELSE NULL END AS Apr_Revenue , CASE WHEN month = "May" THEN revenue ELSE NULL END AS May_Revenue , CASE WHEN month = "Jun" THEN..