일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- SQL
- Data Engineering
- docker container
- docker image
- docker
- 2023년 목표
- delete join
- Spark
- airflow architecture
- 데이터 엔지니어
- MySQL
- Pseudo Lab
- terraform
- Dynamic Programming
- hackerrank
- airflow webserver
- BOT
- telegram
- 백준 온라인 저지
- 백준온라인저지
- Python
- data_engineer
- dsf
- datacamp
- Airflow
- 그리디
- 알고리즘
- 빅데이터를 지탱하는 기술
- leetcode
- 프로그래머스
- Today
- Total
목록SQL/SQL 문제 (30)
Lim Seunghyun Space
문제 출처 https://leetcode.com/problems/capital-gainloss/description/ Capital Gain/Loss - LeetCode Can you solve this real interview question? Capital Gain/Loss - Table: Stocks +---------------+---------+ | Column Name | Type | +---------------+---------+ | stock_name | varchar | | operation | enum | | operation_day | int | | price | int | +------------ leetcode.com 문제 해설 각 stock_name별 Gain 혹은 Loss의..
Source https://leetcode.com/problems/market-analysis-i/ Market Analysis I - LeetCode Can you solve this real interview question? Market Analysis I - Table: Users +----------------+---------+ | Column Name | Type | +----------------+---------+ | user_id | int | | join_date | date | | favorite_brand | varchar | +----------------+---------+ u leetcode.com 문제 2019년도에 주문 이력이 있는 user_id와 join_date 그리고..
Source https://leetcode.com/problems/exchange-seats/description/ Exchange Seats - LeetCode Can you solve this real interview question? Exchange Seats - Table: Seat +-------------+---------+ | Column Name | Type | +-------------+---------+ | id | int | | student | varchar | +-------------+---------+ id is the primary key column for this table. Ea leetcode.com 문제 연속된 두 학생의 ID를 교환하는 쿼리를 작성 마지막 학생의 ..
문제 출처 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..
문제 : https://www.hackerrank.com/challenges/what-type-of-triangle/problem?isFullScreen=true Type of Triangle | HackerRank Query a triangle's type based on its side lengths. www.hackerrank.com 문제 해설 TRIANGLES 테이블의 A, B, C에 조건을 이용하여 어떤 유형인지 출력하기 Equilateral : 3변의 길이가 모두 같을시 Isosceles : 2변의 길이가 같을시 Scalene : 3변의 길이가 모두 다를시 Not A Triangle : 삼각형의 형태가 될 수 없을시 (A + B 조건1에 맞으면 값1 리턴 아니면 조건2로 넘어감, 조건2가 맞으..