본문 바로가기

Leetcode20

[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.
[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.
[leetcode] 550. Game Play Analysis IV/ 이틀 연속 로그인한 유저 /LEFT JOIN/IN 550. Game Play Analysis IV https://leetcode.com/problems/game-play-analysis-iv/ Game Play Analysis IV - LeetCode Can you solve this real interview question? Game Play Analysis IV - 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 fraction of players that logg.. 2023. 2. 19.
[leetcode] 1164. Product Price at a Given Date / 지정 날짜에 변경된 데이터 조회 / UNION 1164. Product Price at a Given Date https://leetcode.com/problems/product-price-at-a-given-date/ Product Price at a Given Date - LeetCode Can you solve this real interview question? Product Price at a Given Date - 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 find th.. 2023. 2. 17.
[SQL문법] UNION, UNION ALL / 친구가 가장 많은 사람 구하기 - 602. Friend Requests II SELECT문 결과를 합치기위해 UNION, UNION ALL을 사용하면 된다. 차이점 UNION 사용시 중복을 제거하고, 합쳐져서 출력됨 UNION ALL 사용시 중복까지 모두 포함해서 출력됨 조건 1️⃣ 각 쿼리의 컬럼 수와 데이터 타입이 일치해야 한다. 2️⃣ 첫 번재 쿼리의 별칭(AS)으로 결과가 출력된다. 두번째 쿼리는 별칭을 생략할 수 있고, 별칭을 지정해도 첫번째 쿼리의 별칭으로 결과가 출력된다. 3️⃣ ORDER BY는 쿼리 마지막에 사용하고, 합쳐진 모든 결과를 정렬한다. 별칭 및 컬럼 순번으로 정렬 가능 (A.col 불가능) SELECT 'park' AS last_name -- 첫번째 쿼리의 별칭으로 출력됨 , salary AS sal FROM emp GROUP BY dep UNION .. 2023. 1. 17.
[leetcode] 577. Employee Bonus / COALESCE 577. Employee Bonus https://leetcode.com/problems/employee-bonus/ Employee Bonus - LeetCode Can you solve this real interview question? Employee Bonus - 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 name and bonus amount of each employee with a bonus less .. 2023. 1. 15.