일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- BOT
- telegram
- data_engineer
- docker
- Python
- 프로그래머스
- Airflow
- Pseudo Lab
- Dynamic Programming
- 그리디
- docker container
- airflow architecture
- hackerrank
- datacamp
- 알고리즘
- 백준온라인저지
- 빅데이터를 지탱하는 기술
- airflow webserver
- dsf
- 2023년 목표
- terraform
- docker image
- 백준 온라인 저지
- 데이터 엔지니어
- SQL
- leetcode
- delete join
- Data Engineering
- Spark
- MySQL
- Today
- Total
목록전체 글 (104)
Lim Seunghyun Space
개요 딕셔너리에 없는 키에 접근할 때 특정 기본값을 지정해주기 위해 사용 defaultdict는 collections안에 구현 생성 방법 from collections import defaultdict sample = defaultdict() # defaultdict에 default 값을 지정해주지 않으면 없는 key 접근시 KeyError가 발생한다. # print(sample["one"]) >> KeyError 발생 default = dict sample2 = defaultdict(default) # defaultdict(Default Value) # Default Value는 무조건 callable 해야한다. print(sample2["one"]) defaultdict(default)으로 생성하며 ..
문제 출처 https://leetcode.com/problems/rising-temperature/ Rising Temperature - LeetCode 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 나의 풀이(MySQL) SELECT w2.id FROM Weather AS w1 JOIN Weather As w2 ON DATE(w1.recordDate) = DATE_SUB(w2.recordDate, INTERVAL 1 DAY) WHERE w1.temperature < w2.te..
문제 출처 https://leetcode.com/problems/delete-duplicate-emails/ Delete Duplicate Emails - LeetCode 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 나의 풀이(MySQL) DELETE P1 FROM Person AS P1 JOIN Person AS P2 ON P1.email = P2.email WHERE P1.id > P2.id;
문제 출처 https://leetcode.com/problems/department-highest-salary/ Department Highest Salary - LeetCode 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 나의 풀이(MySQL) select dep.name as Department, emp.name as Employee, emp.salary as Salary from -- part별 최대 급여를 받는 사람을 조회 (select e.name, e.salary,..
문제 출처 https://leetcode.com/problems/customers-who-never-order/ Customers Who Never Order - LeetCode 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 나의 풀이 (not in 사용) select c.name as Customers from Customers as c where c.id not in (select distinct(customerId) from Orders) 나의 풀이(not exists 사..
문제 출처 https://leetcode.com/problems/duplicate-emails/ Duplicate Emails - LeetCode 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 email as Email from Person group by email having count(email) > 1;
문제 출처 https://leetcode.com/problems/employees-earning-more-than-their-managers/ Employees Earning More Than Their Managers - LeetCode 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 emp.name as Employee from Employee as emp join Employee as mgr on emp.managerId = mgr.id where e..
상황 새로운 VM에 git의 repo를 clone 후 코드를 업로드를 위해 git push시 Username과 Password 입력 후 fatal: Authentication failed for 가 발생 원인 password authentication가 만료되어서 발생 해결 방법 Github - Settings - Developer setting - Personal access tokens 에서 Generate new token 실행 Note : token 설명 Expiration : 토큰 만료일자 Select scopes : token의 access 범위 생성된 Token을 복사 후 git push 이후 password 대신 해당 token key를 붙여넣기 ※ error: src refspec mas..
문제 출처 https://www.acmicpc.net/problem/13305 13305번: 주유소 표준 입력으로 다음 정보가 주어진다. 첫 번째 줄에는 도시의 개수를 나타내는 정수 N(2 ≤ N ≤ 100,000)이 주어진다. 다음 줄에는 인접한 두 도시를 연결하는 도로의 길이가 제일 왼쪽 도로부터 N-1 www.acmicpc.net 문제 요구사항 N개의 도시가 수평으로 존재하는 어떤 나라에서 수평의 제일 왼쪽의 도시에서 제일 오른쪽의 도시로 차를 타고 이동 인접한 두 도시 사이의 도로를 이동할 때 1Km마다 1L의 기름을 사용 최초 출발시에는 기름이 없어서 주유소에서 기름을 넣고 출발 각 도시에는 단 하나의 주유소가 존재하며, 리터당 가격이 도시마다 다를 수 있음 제일 왼쪽 도시에서 제일 오른쪽 도시..
문제 출처 https://www.acmicpc.net/problem/11399 11399번: ATM 첫째 줄에 사람의 수 N(1 ≤ N ≤ 1,000)이 주어진다. 둘째 줄에는 각 사람이 돈을 인출하는데 걸리는 시간 Pi가 주어진다. (1 ≤ Pi ≤ 1,000) www.acmicpc.net 문제 해설 사람이 N명이고, 각 사람이 돈을 인출하는 데 걸리는 시간을 주어진다. ATM 기기가 하나밖에 없기 때문에 줄을 잘 배정하여 모든 사람이 돈을 인출하는 게 덜리는 시간의 합이 최소화하도록 하기 이 문제의 경우, 1번이 인출해야 2번이 인출이 가능하고 2번이 인출해야 3번이 인출이 가능하다. 즉, n번째 사람이 인출하려면 n1, n2, .... , n-1번 사람이 모두 인출이 되어야 한다. 이를 수식으로 변..