본문 바로가기

전체 글127

[SQL문법] RANGE BETWEEN AND / UNBOUNDED PRECEDING / FOLLOWING RANGE BETWEEN 과 AND 사이에 사용 UNBOUNDED PRECEDING : 최종 출력될 값의 맨 처음 row의 값 CURRENT ROW : 현재 row UNBONDED FOLLOWING : 최종 출력될 값의 맨 마지막 row의 값 숫자 PRECEDING AND 숫자 FOLLOWING : 숫자만큼 위, 아래 row의 값 ex) between 1 preceding and 1 following -- 바로 위, 아래 row의 값 디폴트는 RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW 이다. 리트코드 문제 예제 2023.04.19 - [분류 전체보기] - [leetcode] 601. Human Traffic of Stadium / 연속된 숫자 3개 이상 [l.. 2023. 4. 8.
[leetcode] 585. Investments in 2016 / 투자 가치 합 585. Investments in 2016 https://leetcode.com/problems/investments-in-2016/ Investments in 2016 - LeetCode Can you solve this real interview question? Investments in 2016 - 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 Write an SQL query to report the sum of all total investment values in.. 2023. 4. 1.
[leetcode] 1907. Count Salary Categories/급여 범주 구하기/CASE WHEN 1907. Count Salary Categories https://leetcode.com/problems/count-salary-categories/ Count Salary Categories - LeetCode Can you solve this real interview question? Count Salary Categories - Table: Accounts +-------------+------+ | Column Name | Type | +-------------+------+ | account_id | int | | income | int | +-------------+------+ account_id is the primary key for this t leetcode.com Write an.. 2023. 3. 31.
[leetcode] 1321. Restaurant Growth/7일간의 이동 평균 1321. Restaurant Growth https://leetcode.com/problems/restaurant-growth/ Restaurant Growth - LeetCode Can you solve this real interview question? Restaurant Growth - 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 You are the restaurant owner and you want to analyze a possible expansion (th.. 2023. 3. 29.
[leetcode] 1341. Movie Rating / 평점 가장 많이 남긴 사람, 평점이 가장 높은 영화 1341. Movie Rating https://leetcode.com/problems/movie-rating/ Movie Rating - LeetCode Can you solve this real interview question? Movie Rating - Table: Movies +---------------+---------+ | Column Name | Type | +---------------+---------+ | movie_id | int | | title | varchar | +---------------+---------+ movie_id is the primary key for this leetcode.com Write an SQL query to: Find the name of th.. 2023. 3. 27.
[생활의 지혜] 신입으로서 실수했을때 대처법! 처음이라, 익숙하지 않아서, 잘 몰라서, 미숙하기 때문에 실수는 당연하다! 하지만,, 절대 해서는 안되는 행동과 마인드 내가 한 실수,, 아무도 몰랐으면,, 나 혼자 해결할 수 있겠지? "간혹 실수를 하는 것은 크나큰 질책의 대상이 될 수 없다. 다만 실수를 처리하는 태도를 보면 그가 어떤 사람인지 정확히 알 수 있다." - 시타 고노스케, 마쓰시타 전기 사업의 창업주 1️⃣ 깔끔하게 인정하고 사과하기 실수했을땐, 나도 모르게 핑계를 대고 변명을 하는 경우가 많다. 하지만 문제 해결에 전혀 도움이 되지 않는다. 억울하더라도 문제가 다 해결되고 나서 말하면 된다. 상사, 상대방도 내가 사회초년생임을 알지만, 업무가 늘어 기분이 나쁠 수 있다. ✨이럴땐, 인정하고 사과를 하는것이 중요하다. 회피하고, 핑계대.. 2023. 3. 17.
[leetcode] 1204. Last Person to Fit in the Bus / 버스 마지막 승객 구하기 1204. Last Person to Fit in the Bus https://leetcode.com/problems/last-person-to-fit-in-the-bus/ Last Person to Fit in the Bus - LeetCode Can you solve this real interview question? Last Person to Fit in the Bus - 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 There is a queue of people wa.. 2023. 3. 9.
[SQL문법] WHERE 조건절과 JOIN의 ON의 차이점 WHERE 조건절과 JOIN의 ON의 차이점은 JOIN하는 범위가 다르다. 예시 1. WHERE 절에 조건을 넣으면 t1과 t2 테이블을 그냥 조인하고, t2의 컬럼이 10 이상인것들만 출력한다. # 1 SELECT * FROM table t1 LEFT JOIN table2 t2 ON (t1.col = t2.col) WHERE t2.col >= 10; 2. t1 테이블과 t2 테이블 중 col이 10 이상인 경우만 조인해서 출력한다. # 2 SELECT * FROM table t1 LEFT JOIN test2 t2 ON (t1.col = t2.col AND t2.col >= 10); ON : JOIN 하기 전 필터링을 한다 (=ON 조건으로 필터링이 된 레코들간 JOIN이 이뤄진다) WHERE : JOI.. 2023. 3. 9.
[leetcode] 1174. Immediate Food Delivery II / 즉시배송할 수 있는 주문비율 1174. Immediate Food Delivery II https://leetcode.com/problems/immediate-food-delivery-ii/ Immediate Food Delivery II - LeetCode Can you solve this real interview question? Immediate Food Delivery II - Table: Delivery +-----------------------------+---------+ | Column Name | Type | +-----------------------------+---------+ | delivery_id | int | | customer_id | int | | order_date | d leetcode.com.. 2023. 3. 8.